-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Space left after level #224
Comments
Are you sure that there is only one space between TRACE and mymodule? |
Without looking into this further, one question I have is if that is padding as INFO is one letter shorter than TRACE. |
I ran into this today: let mut builder = Builder::from_env(Env::default().default_filter_or("warn"));
builder.format_timestamp(None);
builder.format_target(false);
//builder.format(|buf, record| {
// writeln!(buf, "[{}] {}", record.level(), record.args())
//});
builder.init(); Without the commented out code, I get the extra space too. The custom format would fix it for me, except I miss out on colours. I could probably add them back myself, but I'm not sure how to do so in a cross platform way that also works with redirect to file (non-terminal output) etc. So my question is: How do I get rid of the space but keep the default auto-colour support for the log level? |
There are ways to doing styling in a cross-platform way though I want to replace this with |
@epage is there a way for me as a user to use anstream today with env_logger (MSRV is not an issue for me), or does it require access to internals making it impossible? |
You might be able to get it to work by setting it to |
Implemented as suggested in rust-cli/env_logger#224
#298 will switch us to |
The default message format will print:
When disable the target (module), there is an extra space before the
]
.Could this be fixed ?
The text was updated successfully, but these errors were encountered: