Skip to content

Commit

Permalink
Replace pretty_env_logger with simple_logger
Browse files Browse the repository at this point in the history
pretty_env_logger never updates env_logger dependency and
always causes problems
  • Loading branch information
msrd0 committed Mar 9, 2024
1 parent 8721f23 commit 5b6e510
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ futures-executor = "0.3.19"
gotham = { version = "0.7.2", features = ["testing"], default-features = false }
paste = "1.0"
pretty_assertions = "1.0"
pretty_env_logger = "0.5"
simple_logger = "4.3"
tokio = { version = "1.17", features = ["time"], default-features = false }
thiserror = "1.0.2"
trybuild = "=1.0.89"
Expand Down
3 changes: 2 additions & 1 deletion tests/async_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use gotham_restful::*;
#[cfg(feature = "openapi")]
use openapi_type::OpenapiType;
use serde::Deserialize;
use simple_logger::SimpleLogger;
use tokio::time::{sleep, Duration};

mod util {
Expand Down Expand Up @@ -96,7 +97,7 @@ async fn state_test(state: &mut State) -> Raw<&'static [u8]> {

#[test]
fn async_methods() {
let _ = pretty_env_logger::try_init_timed();
_ = SimpleLogger::new().env().with_local_timestamps().init();

let server = TestServer::new(build_simple_router(|router| {
router.resource::<FooResource>("foo");
Expand Down
3 changes: 2 additions & 1 deletion tests/sync_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use gotham_restful::*;
#[cfg(feature = "openapi")]
use openapi_type::OpenapiType;
use serde::Deserialize;
use simple_logger::SimpleLogger;

mod util {
include!("util/mod.rs");
Expand Down Expand Up @@ -82,7 +83,7 @@ fn delete(_id: u64) -> Raw<&'static [u8]> {

#[test]
fn sync_methods() {
let _ = pretty_env_logger::try_init_timed();
_ = SimpleLogger::new().env().with_local_timestamps().init();

let server = TestServer::new(build_simple_router(|router| {
router.resource::<FooResource>("foo");
Expand Down

0 comments on commit 5b6e510

Please sign in to comment.