I came across tracing and noticed that flexi_logger has some support for it, so i tried it out, and once it is working it is working "great", but the setup is a little more annoying that should likely be, here some points:
currently tracing can only be setup via the flexi_logger::trc::setup_tracing function (not combined with something like Logger / LoggerHandle)
no way to clone a FileLogWriter (for example from a Logger or LoggerHandle)
no way to clone / get a LogSpecification from a Logger
a way to integrate those "keep around the return value"(/_keep_alive_handles) on a Logger / LoggerHandle
EDIT: only one Writer is supported (like only to a file or somewhere else, not std* and file)
EDIT2: trc implies specfile and async (though i dont see the need to)
TL;DR: clone a Logger's configuration (like printing to various places like stdout/stderr and files) or integrating with it
Please note that i dont have too much experience with tracing itself, as i just came around to find it (and async in general).
Maybe i am also completely misunderstanding on how tracing in flexi_logger or tracing in general is meant to be used
Thanks a lot for the feedback! I fully agree. At least when I wrote the stuff, the API of tracing for subscribers was really hard to use, much more than it should be.
I'll give it another try...
I came across
tracing
and noticed that flexi_logger has some support for it, so i tried it out, and once it is working it is working "great", but the setup is a little more annoying that should likely be, here some points:flexi_logger::trc::setup_tracing
function (not combined with something likeLogger
/LoggerHandle
)FileLogWriter
(for example from aLogger
orLoggerHandle
)LogSpecification
from aLogger
_keep_alive_handles
) on aLogger
/LoggerHandle
trc
impliesspecfile
andasync
(though i dont see the need to)TL;DR: clone a
Logger
's configuration (like printing to various places like stdout/stderr and files) or integrating with itPlease note that i dont have too much experience with
tracing
itself, as i just came around to find it (and async in general).Maybe i am also completely misunderstanding on how tracing in flexi_logger or tracing in general is meant to be used
example of current non-tracing
Logger
/LoggerHandle
creation we use