You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to define log levels in in a config file. To do so, I was able to get the tracing component by its ID, cast it and use the reload_filter method. This feels however awkward.
I propose to impl Component's after_config() for trace::component::Tracing.
(This is related to #332 as Component is currently derived.)
Moreover, I propose to add a method update_tracing_config(&self) -> Option<trace::Config> to Config (with default impl returning None), such that the after_config() for the Tracing component could look like:
fn after_config(&mut self, config: &A::Cfg) -> Result<(), FrameworkError> {
if let Some(config) = config.update_tracing(){
self.reload_filter(config.filter)
}
Ok(())
}
The text was updated successfully, but these errors were encountered:
I want to define log levels in in a config file. To do so, I was able to get the tracing component by its ID, cast it and use the
reload_filter
method. This feels however awkward.I propose to impl
Component
'safter_config()
fortrace::component::Tracing
.(This is related to #332 as
Component
is currently derived.)Moreover, I propose to add a method
update_tracing_config(&self) -> Option<trace::Config>
toConfig
(with default impl returningNone
), such that theafter_config()
for theTracing
component could look like:The text was updated successfully, but these errors were encountered: