Fixed bug
This commit is contained in:
parent
1f0fc2f605
commit
4c43aba220
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -183,7 +183,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "actix-web-utils"
|
name = "actix-web-utils"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"log",
|
"log",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-web-utils"
|
name = "actix-web-utils"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Franklin E. Blanco"]
|
authors = ["Franklin E. Blanco"]
|
||||||
description = "Just some useful addons for actix web."
|
description = "Just some useful addons for actix web."
|
||||||
|
@ -4,7 +4,7 @@ pub struct SimpleLogger;
|
|||||||
|
|
||||||
impl log::Log for SimpleLogger {
|
impl log::Log for SimpleLogger {
|
||||||
fn enabled(&self, metadata: &Metadata) -> bool {
|
fn enabled(&self, metadata: &Metadata) -> bool {
|
||||||
metadata.level() <= Level::Info
|
metadata.level() <= Level::Trace
|
||||||
}
|
}
|
||||||
|
|
||||||
fn log(&self, record: &Record) {
|
fn log(&self, record: &Record) {
|
||||||
|
@ -6,7 +6,7 @@ static LOGGER: SimpleLogger = SimpleLogger;
|
|||||||
|
|
||||||
pub fn init_logger_default() -> Result<(), SetLoggerError> {
|
pub fn init_logger_default() -> Result<(), SetLoggerError> {
|
||||||
log::set_logger(&LOGGER)
|
log::set_logger(&LOGGER)
|
||||||
.map(|()| log::set_max_level(LevelFilter::Trace))
|
.map(|()| log::set_max_level(LevelFilter::Info))
|
||||||
}
|
}
|
||||||
/// 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.
|
/// 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
|
/// 0 -> Off, 1 -> Trace, 2 -> Debug, 3 -> Info, 4 -> Warn, 5 -> Error
|
||||||
|
Loading…
Reference in New Issue
Block a user