Skip to content

How to avoid [3ma[0m[2m= in file log properly? #3229

Answered by kaffarell
failable asked this question in Q&A
Discussion options

You must be logged in to vote

This is because the formatted fields are not stored properly and only one action (ansi=true or ansi=false) is recorded. This should be fixed with #3221. In the meantime you can put the stdout_layer above the file_layer in the layers vec, so:

let layers = vec![
      file_layer.with_filter(LevelFilter::INFO).boxed(),
      stdout_layer.with_filter(LevelFilter::INFO).boxed(),
  ];

This will trigger the no-ansi formatted fields to be inserted first.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by failable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants