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

Look into ways of improving logs for users running a node #4729

Open
hstove opened this issue Apr 29, 2024 · 4 comments
Open

Look into ways of improving logs for users running a node #4729

hstove opened this issue Apr 29, 2024 · 4 comments

Comments

@hstove
Copy link
Contributor

hstove commented Apr 29, 2024

This is a placeholder issue, more work needs to be done to figure out exactly what work should be done.

For many people who run a node for the first time, there are a lot of logs, and often those logs make it seem like something is broken even when everything is behaving normally. In some cases this is due to a warn used when a debug might be better, or info for something that should maybe be a debug. There are also instances where a specific line is logged much too frequently.

Improving logs could make it easier to run a node and better debug when things go wrong.

@AshtonStephens
Copy link
Collaborator

AshtonStephens commented Apr 30, 2024

Is this ticket consensus release critical for Nakamoto?

@hstove
Copy link
Contributor Author

hstove commented Apr 30, 2024

@AshtonStephens nope, it's just to improve signer onboarding

@hstove
Copy link
Contributor Author

hstove commented Apr 30, 2024

One small change we could make it to support different log levels. Right now, you can only use either trace, debug, or fatal log levels specified via ENV vars. We could also support warn and error by changing this code:

fn inner_get_loglevel() -> slog::Level {
if env::var("STACKS_LOG_TRACE") == Ok("1".into()) {
slog::Level::Trace
} else if env::var("STACKS_LOG_DEBUG") == Ok("1".into())
|| env::var("BLOCKSTACK_DEBUG") == Ok("1".into())
{
slog::Level::Debug
} else if env::var("STACKS_LOG_CRITONLY") == Ok("1".into()) {
slog::Level::Critical
} else {
slog::Level::Info
}
}

@AshtonStephens
Copy link
Collaborator

Yeah actually that would be a great fast improvement, I see we have warn! a lot in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

4 participants