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

set default log level to info for all components #59

Closed
alexandrebrg opened this issue Mar 20, 2023 · 4 comments
Closed

set default log level to info for all components #59

alexandrebrg opened this issue Mar 20, 2023 · 4 comments
Labels
good first issue Good for newcomers type/enhancement New feature or request

Comments

@alexandrebrg
Copy link
Member

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
@alexandrebrg alexandrebrg added type/enhancement New feature or request good first issue Good for newcomers labels Mar 20, 2023
@alexandrebrg alexandrebrg moved this to 🆕 New in RIK Tracking Mar 20, 2023
@JeremyLARDENOIS JeremyLARDENOIS self-assigned this Apr 2, 2023
@JeremyLARDENOIS
Copy link
Contributor

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
Copy link
Member

I'm working on it for riklet #69
But you can do it for the other projet
@JeremyLARDENOIS

@JeremyLARDENOIS
Copy link
Contributor

@MaloPolese Do you have any example of what must be done? I think that I misunderstand the idea behind this issue.

@kalil-pelissier
Copy link
Contributor

Done in #94

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in RIK Tracking Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers type/enhancement New feature or request
Projects
Status: Done
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants