Skip to content
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

Logging initialization improvement #1857

Open
wants to merge 1 commit into
base: feat/log_to_file
Choose a base branch
from

Conversation

ImplOfAnImpl
Copy link
Contributor

Here I replaced init_logging_to and init_logging_with_env_var with a single function init_logging_generic that allows to specify an additional destination with separate filter and style settings.

The "log_file" is now passed to init_logging_generic as this second destination. The level is "info" to keep the log size reasonable, though we may change it to debug too (but note that the simple "debug" will be too noisy for node-gui due to 3rd-party crates, so we'll need to filter them out)

With this approach we

  1. can have both the console and file log at the same time;
  2. can be sure that the user's messing with RUST_LOG won't affect the log file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant