Closed
Description
From the docs on disable_logging()
I believe this should be able to enable the debug logging. Either it's broken or the docs aren't clear on correct usage
julia> using Logging
julia> @debug "hello"
julia> Logging.disable_logging(Logging.BelowMinLevel)
LogLevel(-1000000)
julia> @debug "hello"
julia>
Activity
YellowFoxH4XOR commentedon Dec 6, 2019
So first of all to see the logs in realtime use ENV["JULIA_DEBUG"] = "all"
hope this resolves your issue 😄
IanButterworth commentedon Dec 6, 2019
I see. So
JULIA_DEBUG
overrules the loglevel system for@debug
.Instead of the docstring here:
Perhaps it's more accurate to say
I can PR if you agree?
IanButterworth commentedon Dec 6, 2019
I have to say I do find that setup a bit inelegant/unclear
YellowFoxH4XOR commentedon Dec 6, 2019
`ENV["JULIA_DEBUG"] = "YourPackage" makes more sense
Also, need a clear picture of how disable_logging() affects debug, info, warn and error
LogLevel(-1_000)
are ignored, even when a custom task-local logger is used #52234JimCircadian commentedon Mar 21, 2025
I'm keen on this change @IanButterworth. It feels quite unclear to be unable to enable debug logging during development without resorting to environment variable changes, especially when it effectively means the
disable_logging
becomes redundant.EDIT: Appreciate that brute forcing all modules to log debug might be a bit naff, so also happy to look at a PR, perhaps with some addition that allows registration of the necessary modules? A
enable_debug
for modules imported / used, perhaps?add note about `disable_logging`
IanButterworth commentedon Apr 3, 2025
A clarifying note added to #57591
Logging: Improve threadsafety (JuliaLang#57591)
Logging: Improve threadsafety (JuliaLang#57591)
Logging: Improve threadsafety (#57591)
Logging: Improve threadsafety (#57591)
Logging: Improve threadsafety (#57591)
Logging: Improve threadsafety (#57591)
Logging: Improve threadsafety (#57591)
Logging: Improve threadsafety (#57591)
Logging: Improve threadsafety (#57591)
Logging: Improve threadsafety (#57591)