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.
The
RUST_LOGsyntax 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
logstatement 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.