diff --git a/Cargo.lock b/Cargo.lock index 1343a45..838b82b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -183,7 +183,7 @@ dependencies = [ [[package]] name = "actix-web-utils" -version = "0.1.3" +version = "0.1.4" dependencies = [ "actix-web", "log", diff --git a/Cargo.toml b/Cargo.toml index 5bef92b..482ee6e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-web-utils" -version = "0.1.3" +version = "0.1.4" edition = "2021" authors = ["Franklin E. Blanco"] description = "Just some useful addons for actix web." diff --git a/src/utils/logger_util.rs b/src/utils/logger_util.rs index 8bd490b..6a3f684 100644 --- a/src/utils/logger_util.rs +++ b/src/utils/logger_util.rs @@ -4,7 +4,7 @@ use crate::extensions::logger::SimpleLogger; static LOGGER: SimpleLogger = SimpleLogger; -pub fn init() -> Result<(), SetLoggerError> { +pub fn init(max_log_level_filter: LevelFilter) -> Result<(), SetLoggerError> { log::set_logger(&LOGGER) - .map(|()| log::set_max_level(LevelFilter::Info)) + .map(|()| log::set_max_level(max_log_level_filter)) } \ No newline at end of file