-
Notifications
You must be signed in to change notification settings - Fork 527
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
Console debugging experience when nothing works is not ideal #385
Comments
For reference, this means We have to decide which services are important enough to get their full output in the console. It shouldn't be many, or the output will become generally incomprehensible due to volume. Each message also slows down boot a bit, because of kernel-level locking on the serial output. |
There's a tip at the end of this Arch wiki section indicating that the answer here is overriding |
That is certainly the answer when using |
We also talked in the aisle about perhaps keying off the success/failure state reported as part of #86's work (cc @jamieand) and dumping a bunch of diagnostic output to the console on a detected failure. There's a balance we have to strike here — we need the critical messages as part of boot in case that also fails. |
Not finding one yet. Similar for disabling color - I found that |
Maybe we just have to tell systemd it's outputting to a vt100. |
No service is important enough to get its full output in the console. The slow down is not a "tiny bit", it is quite significant. |
I can't speak to the rest, but I believe the |
Most of my pain was systemd coloring |
An idea I'm playing with is having first-party (and adjacent) services log stderr to journal+console, and having only error-level messages log to stderr. I reached out to @davidbarsky for some help with tracing, seeing if that's easy to do. |
@davidbarsky was very helpful in understanding So, I think the best answer for now is to use a logger with this split-destination feature. I prototyped with |
@tjkirch Depending on the urgency of this fix, I might have a solution for you—I've re-implemented a decent portion of let stderr = ConsoleLayer::builder()
.with_interest(|event| event.metadata().level() >= &Level::WARN)
.with_writer(io::stderr)
.build();
let stdout = ConsoleLayer::builder()
.with_interest(|event| event.metadata().level() == &Level::INFO)
.with_writer(io::stdout)
.build();
let subscriber = stderr.and_then(stdout).with_subscriber(Registry::default());
tracing::subscriber::set_global_default(subscriber).expect("Could not set global default"); Note that this interface still might change, most notably in Of course, given the instability and incompleteness of this solution, this might not be a good fit for Bottlerocket this moment. However, I wanted to alert you to this option, especially since it might begin to address the telemetry issues in an appealing way. |
#476 addresses missing (first-party) errors on the console. |
With #476 merged I'm removing the urgent tag; I think we should see most of the common errors we had now. I think we should open separate issues to track other software that should expose errors, because we need to handle them carefully so as not to write too much to the console. I'm leaving this open because I think we should address the coloring/truncating issue, but it seems less urgent than not seeing errors at all. |
I've spend some time getting support for arbitrary writers in There's still some work to be done, but I'd find feedback in terms of what directives and features to prioritize to be helpful. Note that the "Writing to: [type_name]" output is not part of the regular output; it's to demonstrate, in a screenshot, that @tjkirch's desired feature will be soon supported in (This week is mostly operational work with decent amounts of downtime. You can see the PR here: tokio-rs/tracing#412) |
Made #570 to output more errors to console on failed boot. |
Thanks to @bcressey for finding |
Does anyone have an example of truncated log output in the console? I'm seeing some pretty long lines on a test instance (650+ characters) with no truncation. |
Going to close this because the only remaining checkbox is line truncation, which I'm not seeing and someone else confirmed they're not seeing. We can reopen if we can reproduce. |
When trying to view the instance system/console log in the EC2 console:
The text was updated successfully, but these errors were encountered: