-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
Description
The RUST_LOG syntax is very mysterious right now. I propose a syntax that looks like this:
RUST_LOG=all— logs everything.RUST_LOG=error— logs errors.RUST_LOG=e— same as above.RUST_LOG=warning— logs errors and warnings.RUST_LOG=warning,typeck— logs errors and warnings in modules nested somewhere within a module named "typeck" (including deeper modules).RUST_LOG=all,typeck,trans— logs all messages coming from a module named "typeck" and all messages coming from a module named "trans"RUST_LOG=debug,rustc::middle::typeck— logs errors and warnings in modules nested somewhere within a module named "typeck" inside a module named "middle" inside a module named "rustc"RUST_LOG=help— displays a help message in the runtime, then exits.
IMHO this would be easy to use.
Basically the log statement would pass a list of module names to the runtime, and the logging function would do a string comparison on each path component to determine which to print.
nfedyashev
Metadata
Metadata
Assignees
Labels
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows