Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Commit

Permalink
Upgrade env_logger to 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
upsuper committed Jan 23, 2024
1 parent 3fdeea0 commit 0a24475
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 56 deletions.
129 changes: 75 additions & 54 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ publish = false
[dependencies]
combine = "4.0.1"
dotenv = "0.15.0"
env_logger = "0.10"
env_logger = "0.11"
derive_more = "0.99.2"
fst = "0.4.0"
fst-subseq-ascii-caseless = "0.1"
Expand Down
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@ fn init_logger() {
let timestamp = buf.timestamp();
let level = record.level();
let level_style = buf.default_level_style(level);
let write_header = write!(buf, "{:>5} {}: ", level_style.value(level), timestamp);
let write_header = write!(
buf,
"{}{level:>5}{} {timestamp}: ",
level_style.render(),
level_style.render_reset(),
);
let write_module_path = match record.module_path() {
None => Ok(()),
Some(mut module_path) => {
Expand Down

0 comments on commit 0a24475

Please sign in to comment.