-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
Hi,
thanks for the great work! I stumbled upon a problem and I am not sure if I misunderstood or if it is a bug. The use of a LogLevel
below -1000 does not seem to work. And LoggingExtras.withlevel()
does not seem to have an effect.
I tested it on Julia v1.10.3 with LoggingExtras v1.0.3.
Consider the following code:
using Logging, LoggingExtras
Trace = Logging.LogLevel(-2000)
LoggingExtras.withlevel(Trace) do
@logmsg Trace "test LogLevel -2000" # not shown
@debug "test LogLevel -1000" # not shown
end
Both messages are not shown, but I would have expected otherwise.
Furthermore, my "fixes" did not work either:
logger = LoggingExtras.LevelOverrideLogger(Trace, global_logger())
Logging.with_logger(logger) do
@info Logging.min_enabled_level(logger) == Trace # true
@logmsg Trace "test LogLevel -2000" # not shown
@debug "test LogLevel -1000" # shown
end
At least now, the debug message is show, but I would have expected both messages to be shown.
The same is true for the following code:
logger = Logging.ConsoleLogger(stderr, Trace)
Logging.with_logger(logger) do
@info Logging.min_enabled_level(logger) == Trace # true
@logmsg Trace "test LogLevel -2000" # not shown
@debug "test LogLevel -1000" # shown
end
Or:
global_logger(logger)
@info Logging.min_enabled_level(logger) == Trace # true
@logmsg Trace "test LogLevel -2000" # not shown
@debug "test LogLevel -1000" # shown
Did I miss something?
Metadata
Metadata
Assignees
Labels
No labels