Skip to content

Commit

Permalink
fix lvl
Browse files Browse the repository at this point in the history
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
  • Loading branch information
yoshuawuyts committed Sep 1, 2019
1 parent 7ed93d5 commit ed25f60
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#![warn(missing_docs, missing_doc_code_examples, unreachable_pub)]
// #![cfg_attr(test, deny(warnings))]

use log::{LevelFilter, Record, logger};
use log::{logger, LevelFilter, Record};

use std::fmt;

Expand Down Expand Up @@ -73,7 +73,7 @@ macro_rules! log {
macro_rules! log_impl {
// End of macro input
(target: $target:expr, $lvl:expr, ($($arg:expr),*)) => {
let lvl = log::Level::Info;
let lvl = $lvl;
if lvl <= $crate::STATIC_MAX_LEVEL && lvl <= $crate::max_level() {
$crate::__private_api_log(
__log_format_args!($($arg),*),
Expand Down Expand Up @@ -229,9 +229,8 @@ pub fn __private_api_log(
args: fmt::Arguments<'_>,
level: Level,
&(target, module_path, file, line): &(&str, &'static str, &'static str, u32),
kvs: Option<&[(&str, &str)]>
kvs: Option<&[(&str, &str)]>,
) {

// Ideally there would be a `From` impl available for this.
struct KeyValues<'a> {
inner: &'a [(&'a str, &'a str)],
Expand Down

0 comments on commit ed25f60

Please sign in to comment.