set default log level to info for all components
Closed this issue · 4 comments
alexandrebrg commented
What needs to be done
- Check our components (
riklet, rikctl, controller, scheduler
) and determiner whether they are using a log level INFO by default - Update the default log level to default if needed
- If the component has a verbosity level argument, it should be taken in consideration aswell
Why is it needed
- We experienced issues where default log level was ERROR, making it unclear to see what's going on
JeremyLARDENOIS commented
Hello, I wanted to take this issue but it seems that all components use info level:
- scheduler:
Ok(ConfigParser {
workers_endpoint: workers_ip,
controller_endpoint: controllers_ip,
verbosity_level: ConfigParser::get_verbosity_level(matches.occurrences_of("v")),
})
}
fn get_verbosity_level(occurrences: u64) -> String {
String::from(match occurrences {
0 => "info",
1 => "debug",
_ => "trace",
})
}
- Controller: tested and is INFO by default too:
2023-04-02T13:23:06.825160Z INFO controller: Starting Rik
- Riklet:
let level = log_level.unwrap_or_else(|| "info".to_string());
- Rikctl:
tracing_subscriber::fmt()
.with_env_filter(
EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
.from_env_lossy()
.add_directive("h2=OFF".parse().unwrap()), // disable all events from the `h2` crate
)
.init();
So should we close this issue or am I missing something?
MaloPolese commented
I'm working on it for riklet #69
But you can do it for the other projet
@JeremyLARDENOIS
JeremyLARDENOIS commented
@MaloPolese Do you have any example of what must be done? I think that I misunderstand the idea behind this issue.
kalil-pelissier commented
Done in #94