Add filter bottom to be trace

This commit is contained in:
Franklin 2022-08-29 13:33:59 -04:00
parent 91b7fa750d
commit 1f0fc2f605
3 changed files with 4 additions and 4 deletions

2
Cargo.lock generated
View File

@ -183,7 +183,7 @@ dependencies = [
[[package]]
name = "actix-web-utils"
version = "0.2.0"
version = "0.2.1"
dependencies = [
"actix-web",
"log",

View File

@ -1,6 +1,6 @@
[package]
name = "actix-web-utils"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
authors = ["Franklin E. Blanco"]
description = "Just some useful addons for actix web."

View File

@ -2,11 +2,11 @@ use log::{SetLoggerError, LevelFilter};
use crate::extensions::logger::SimpleLogger;
pub static LOGGER: SimpleLogger = SimpleLogger;
static LOGGER: SimpleLogger = SimpleLogger;
pub fn init_logger_default() -> Result<(), SetLoggerError> {
log::set_logger(&LOGGER)
.map(|()| log::set_max_level(LevelFilter::Info))
.map(|()| log::set_max_level(LevelFilter::Trace))
}
/// Made this get an integer so that you don't have to import the Log library in your code too, as the LevelFilter enum is inside it.
/// 0 -> Off, 1 -> Trace, 2 -> Debug, 3 -> Info, 4 -> Warn, 5 -> Error