Julia Logging frameworks - Several options but no consensus?

There has been a dedicated page for Julia logging since 2021.

I have been trying to figure out if there now an established consensus on which logging framework should be used with Julia.

In addition to the above link, I also found some results on the Julia Packages website.

Some of these do not appear to be maintained, with updates older than 12 months ago.

However, by the standard of Julia packages, something which has not been updated for 12 months is not necessarily abandonware. Since the number of Julia developers is comparatively small compared to other languages this has the inevitable result that some packages do not receive updates for long periods of time.

Logging.jl

The Logging.jl package is here:

Is this the same package as the Julia standard library logging module? It doesn’t appear to have been updated for 12 months, which if it is a Standard Library module seems kind of surprising.

Memento.jl

This package appears to be actively maintained, but also appears to be totally independent of either the Standard Library logging modules, or any of the packages which are featured in https://julialogging.github.io/.

Since https://julialogging.github.io/ appears to be a collection of logging packages which interop with each other does that mean Memento is not compatible with these other things?

That would suggest Memento is the only main alternative to the packages featured here https://julialogging.github.io/.

If anyone is familiar with both options, would it be possible to provide an overview of both? eg: Why would you choose one over the other?

Other featured options

Other featured options include packages such as

which doesn’t appear to have been updated for 2 years.

Others are even older.

I would assume that these are abandonware?

Just to give some context; Memento (which was originally a fork of Lumberjack) predates the Logging stdlib. The implementation of Logging was inspired by Memento (some breadcrumbs: https://github.com/JuliaLang/julia/pull/24490, https://github.com/JuliaLang/julia/pull/23712, https://github.com/JuliaLang/Juleps/blob/master/Logging.md). I have no experience with Memento so I cannot comment on how they compare otherwise.

I believe most “library packages” simply use the standard @info, @warn, etc, logging macros to fire off log events and leave it up to applications (user code or “application like” packages) do filter/format/handle them.

1 Like

I think your answer conclusively clarifies the situation.

In a nutshell, use this one:

Since Memento is a fork of Lumberjack, and the above I guess is an effective replacement for Memento.

If anyone has any experience with the Log4jl package they could share that would be interesting.

I never really liked Log4j. I don’t know if the design of Log4jl is anything like that of Log4j. (With weird xml configs.)

LoggingExtras.jl has a bunch of useful stuff, and I have MicroLoggers.jl MiniLoggers.jl in my startup, because I like their formatting better than the default. But both of those are built on top of the stdlib Logging

1 Like

Can you clarify is it Miniloggers.jl or MicroLogging.jl which you recommend?

1 Like

Indeed! :man_facepalming:

1 Like

Ok - Miniloggers - thanks, will check it out