eliot icon indicating copy to clipboard operation
eliot copied to clipboard

Use Eliot to generate stdlib log messages?

Open gwerbin opened this issue 2 years ago • 1 comments

Consider the use case of an established web application, which has a nontrivial logging setup involving correlation IDs, integration with some observability platform like Datadog, etc. Migrating such an application to Eliot's entirely separate logging framework would be a tough sell at best, and generally would not be a pragmatic engineering decision, even if Eliot supports a relatively smooth migration path by installing its own handler for stdlib logging.

However, the promise of Eliot's "context-based" and "causal" logging is very enticing. Is there any way that Eliot could be set up to generate logging log entries? One could imagine that Eliot could "install" itself in the form of a logging.Filter that attaches its various metadata items to each log record. Is this something that Eliot can do now, or something that it might be able to do one day?

gwerbin avatar Aug 20 '22 01:08 gwerbin

I think this is incredibly interesting as well!

It would also allow Eliot to be added to library code instead of logging calls. One could imagine it would add "flat" logging info if captured by a logging log, and "causal"/"traced" information if captured by an eliot log.

@itamarst Hope it's OK with a ping here! I tried running through the documentation and code, but didn't find anything on this use case. Did I miss anything? :-)

MartinBernstorff avatar Apr 22 '24 12:04 MartinBernstorff