You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A "that would be nice" feature that's come up occasionally when discussing logging is the ability to log only when an error condition is encountered.
We can get basically this in tests using TestingLogger/StructuredTestingLogger and it would be really handy to be able to do this in production code as well.
I think there's a path to a reasonable implementation using Ref, but I'm not sure if there isn't a more elegant way to handle a logger's lifecycle (particularly in the context of an http4s request).
I haven't poked at how this would work with LoggerFactory, which may have it's own complications.
The text was updated successfully, but these errors were encountered:
A "that would be nice" feature that's come up occasionally when discussing logging is the ability to log only when an error condition is encountered.
We can get basically this in tests using
TestingLogger
/StructuredTestingLogger
and it would be really handy to be able to do this in production code as well.I think there's a path to a reasonable implementation using
Ref
, but I'm not sure if there isn't a more elegant way to handle a logger's lifecycle (particularly in the context of an http4s request).I haven't poked at how this would work with
LoggerFactory
, which may have it's own complications.The text was updated successfully, but these errors were encountered: