c42f / MicroLogging.jl

A simple logging API for julia
Other
26 stars 6 forks source link

Roadmap for 1.x #21

Open Petr-Hlavenka opened 5 years ago

Petr-Hlavenka commented 5 years ago

Hi, I often use the Logging infrastructure that is part of 1.0 stdlib. I'd like to ask what is the purpose of MicroLogging.jl in the context of Logging being part of stdlib?

Also, I'm using a private VisualLogger as a tool, see discussion in discourse. The motivation is, if one writes nice "robust" reusable functionality, e.g. search for peak maxims in an array or image, where the user needs to fine-tune some input parameters that are used somewhere buried inside the function. To see why the algorithm is not satisfied with the provided inputs (e.g. thresholds, ...) the best way is to attach some array intermediates (or directly plots) to a @debug block and after the function is executed with VisualLogger the VisualLogger collects all the objects and those can be reviewed by the user.

Is it possible to host such a functionality in MicroLogging?

c42f commented 5 years ago

MicroLogging was the prototype for the logging frontend which went into Base as of julia-0.7. Right now, it's a prototype for various backend functionality which is desirable in Base, but which I haven't had time/motivation to fully flesh out.

There's now various helper libraries which provide useful logging backend utilities

At some stage we should consolidate some common ideas from the tooling which has been emerging and do a design iteration to make the Logging stdlib more composable with the tooling people want to build.

Currently I've changed jobs and I don't have a strong need for production grade logging which I admit has sapped my motivation to drive this development along! I'm definitely still interested though and would gladly collaborate to review pull requests here and elsewhere.

Petr-Hlavenka commented 5 years ago

Thank you for the great summary.

I really like the basic logging functionality included in the stdlib. Also, I'm fully happy with the @debug @info ... implementation and I don't support any activities in the direction of having any ProgressLogingBase package as suggested in ProgressLogging.jl - I think the progress "keyword" of MicroLogging is the right way.

On the other way, what would be nice to have is the composability of loggers.

Id like to combine a

So, yes, this definitely needs an architecture refactor (in a way fof maybe @oxinabox's LoggingExtras.jl ) and some amount of work to do. On the other hand, I think there is no need to touch the stdlib and all the desired composability is possible on the level of packages, with the enabling infrastructure in e.g. MicroLogging.

oxinabox commented 5 years ago

This can definately be done with LoggingExtras. Most of that is similar to stuff in the examples You probably don't combose it as a single stream It would be a tree with demux loggers at each step. Since in LoggingExtras seperates sinks (loggers that display things) form filters (or other loggers that pass on things)

ResultStorageLoger is a pure sink logger that I have been wanting for a while. ProgressLogger is also a pure sink I would like. I used to have one in https://github.com/oxinabox/OhMyLog.jl then that got merged into OhMyRepl, then it got removed cos it turns out to cause a bunch of issues. But with more care it could be done right.

PR to add that those would be welcomed. I think everything else is very simiilar to stuff in the LoggingExtra's readme