As discussed here, RAP_LOG is supported in this PR to dynamically set log level.
If RAP_LOG is not set, the default level is info as before.
I also remove -debug option because it'd be better to expose single way via RAP_LOG to set up the log level. The option now is equivalent to RAP_LOG=DEBUG.
The value on RAP_LOG is case-insensitive, which is defined in LevelFilter::from_str.
Verbosity is also removed, because there is no reason to use it now.
Some tests:
cargo +nightly-2024-06-30 rap -F and RAP_LOG=WARN cargo +nightly-2024-06-30 rap -F
As discussed here,
RAP_LOG
is supported in this PR to dynamically set log level.If RAP_LOG is not set, the default level is info as before.
I also remove -debug option because it'd be better to expose single way via RAP_LOG to set up the log level. The option now is equivalent to
RAP_LOG=DEBUG
.The value on RAP_LOG is case-insensitive, which is defined in LevelFilter::from_str.
Verbosity
is also removed, because there is no reason to use it now.Some tests:
cargo +nightly-2024-06-30 rap -F
andRAP_LOG=WARN cargo +nightly-2024-06-30 rap -F
RAP_LOG=DEBUG cargo +nightly-2024-06-30 rap -F