How do I enable info messages from a package in the REPL?

LibPQ used to show information about what was happening via @info messages. Recently, it seems these messages have gone away. It may have something to do with the log level of the REPL, but TBH I don’t understand how to control the ConsoleLogger from inside an already running Julia process. The docs seem more oriented towards developing new loggers, rather than changing message filtering from the REPL.

Is there a way to enable the display of debug messages from a particular package, without setting the JULIA_DEBUG environment variable?

Looking at the LibPQ source, it looks like LibPQ is still using Memento for logging, so you should read the Memento documentation for now.

The new logging config system does need a lot of work. At the moment, it’s pretty much limited to installing a new logger via something like

using Logging
global_logger(ConsoleLogger(stderr, Logging.Debug))

and Logging.ConsoleLogger has very limited filtering capability. Of course, you can implement your own logger and that gives you full flexibility, but we need to expand the stdlib too.

3 Likes