ConsoleLogger not active in the REPL
Logging.__init__ replaces the global logger: https://github.com/JuliaLang/julia/blob/1327dfec807fa00782311f02d095b8e37ea55f2a/stdlib/Logging/src/Logging.jl#L93-L95 Before #51399 this was more or less impossible to notice since Logging.__init__ was run when loading the sysimg. However, now this isn't the case anymore. This means that
- The colorless
SimpleLoggeris used by default in the REPL using Loggingreplaces the logger, which might be a logger a user has already configured
julia> @info "Where are my colors?" logtype = typeof(Base.global_logger())
┌ Info: Where are my colors?
│ logtype = Base.CoreLogging.SimpleLogger
└ @ Main REPL[1]:1
julia> using Logging
julia> @info "Thanks for the colors, but you stole my logger..." logtype = typeof(Base.global_logger())
┌ Info: Thanks for the colors, but you stole my logger...
└ logtype = ConsoleLogger
Not sure what the best fix is, but probably REPL should depend on Logging and setup the logger while the REPL initializes.
Maybe the cause of https://github.com/JuliaLang/JuliaSyntax.jl/issues/375
It's a problem before REPL for startup.jl too https://github.com/JuliaLang/julia/issues/51493
I was planning on moving ConsoleLogger to Base to fix this but it depends on StyledStrings now so that's not really possible.