Skip to content

All logging and command line error messages are totally broken in master ["solved"] #3006

Closed as not planned

Description

@mcclure

Rocket Version

master

Operating System

Debian 13

Rust Toolchain Version

rustc 1.97.1 (8bab26f4f 2026-07-14)

What happened?

When I run a Rocket app from the most recent release (0.5.1), if I do not specify a log_level as described here, a helpful debug output goes to stdout. If I upgrade my Rocket app to the newest master commit 3a54d079aef (or even any master as recent as 042b6458e7bc53), this debug output disappears. This is not a defaults problem; adding a Rocket.toml with explicit [default]\nlog_level="debug" does not cause the output to reappear.

In addition to regular logs being missing, error messages do not appear. For example imagine I misconfigure my Rocket.toml such I have [default]\naddress="192.168.0.1" but in fact my address is 192.168.0.2. This causes Rocket to immediately quit on launch, but there is no error message indicating why. Similarly [default]\nlog_level=debug (incorrect due to lack of quotation marks) will cause a Rust panic, with an unhelpful stack trace, again without an error message. 0.5.1 would have printed clear errors in any of these cases, even with log_level="off".

As a final odd note, as mentioned, with [default]\nlog_level="debug" the app runs but if I change it to [default]\nlog_level="normal" in master, the app immediately quits with no error message, as if it had aborted on a non-allowed value in the toml. (docs/guide/10-configuration.md continues, in master, to describe "normal" as an allowed value and in fact the default value in debug mode).

Test Case

Here is a sample project I made: https://codeberg.org/mcc/rocket-hello

To run it, try:

(cd client && npm install) && (cd client && npx webpack) && cargo run -p rkth-server

Running with git commit 17c58e7cffc98fa, this uses 0.5.1. To run this same example with newest master, edit server/Cargo.toml and replace the rocket line with

rocket = { git = "https://github.com/rwf2/Rocket", rev = "3a54d079aef", default-features=false, features = ["json"] }

Log Output

$ ROCKET_LOG_LEVEL=debug cargo run -p rkth-server
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.17s
     Running `target/debug/rkth-server`

...And that's literally it

Additional Context

I understand master branch is not necessarily supported, but I am developing an application which depends on PR #2970 and 2970 rests atop master, so this is severely impacting my development. master has been in this state since at least last October.

System Checks

  • My bug report relates to functionality.
  • I have tested against the latest Rocket release or a recent git commit.
  • I have tested against the latest stable rustc toolchain.
  • I was unable to find this issue previously reported.

Activity

  1. mcclure commented on Aug 14, 2026

    @mcclure
    Author

    Running git bisect it appears this was broken in ff6da90 .

    This commit one of a series of commits, completing around cc2b159 which contains the feature documentation, migrating to the tracing crate. I don't think there's a PR associated.

    The problem I was seeing is that logging no longer works unless the trace feature is enabled. This is enabled by default, but I disabled default-features because my configuration does not need HTTP2. If I add the trace feature, my logging works again.

    My problem is now resolved. I don't know if there's anything Rocket should do differently here. The only thing I guess I can say is you really need to be very clear in the release notes around your next release that everyone using no-default-features must enable a trace feature to get equivalent behavior to 0.5.1.

    Additionally, since the goal of these changes seems to be Rocket should behave "normally" for a Rust crate, it seems awkward that a malformed Rocket.toml (e.g.: log_level=debug is a panic, rocket.mount does not return) is treated differently from a Rocket.toml which is valid but has malformed keys (e.g.: log_level="bgeoifawg" aborts cleanly at a later time, presumably this is recoverable somehow).

  2. changed the title [-]All logging and command line error messages are totally broken in master[/-] [+]All logging and command line error messages are totally broken in master ["solved"][/+] on Aug 14, 2026
  3. mcclure commented on Aug 14, 2026

    @mcclure
    Author

    Two additional thoughts:

    • I fix some post-Tracing inaccuracies in the docs in PR Correct docs to reflect new log_level names in post-tracing Rocket #3007.

    • Say that Rocket is built without tracing, and the user explicitly sets log_level to something other than "off". Should this be treated as an error, and the webserver refuse to boot, the way it would if log_level were set to "agohewafoijaew"? Or perhaps, should Rocket violate the tracing contract and print directly to STDERR "Warning: User requested a log_level, but tracing is fully disabled in this build"?

      The problem currently is if the user accidentally themselves in the Bad Place I put myself in above, they are in an error condition ("requested tracing, but tracing is disabled") but they have no way of finding this out, because the error condition suppresses reports about error conditions.

  4. SergioBenitez commented on Oct 23, 2026

    @SergioBenitez
    Member

    As indicated, you must enable trace. I will review the PR separately.

  5. mcclure commented on Oct 23, 2026

    @mcclure
    Author

    Thank you for continuing to maintain this, and I am happy to see the project continue at its present slow pace instead of suddenly switching to high churn and a CLAUDE.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageA bug report being investigated

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions