-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Impl
update_config
to support remote update
- Removed `reload_config` b/c it's been deprecated. There are code patterns like `writer.lock().unwrap_or_else(...)` which ignore `PoisonError`, assuming that the log writer should not cause a panic even if another thread has poisoned the lock. If `log_dir` changes by updating config, logs should be saved in that directory. This commit implements this by wrapping the file writer. Alternatively, `tracing_subscriber::reload` could be used, but it cannot handle cases where the directory is added or removed (as it requires reassigning the writer itself, which is not possible due to internal limitations). Related issue: tokio-rs/tracing#1629 Close: #112
- Loading branch information
Showing
4 changed files
with
184 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.