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
I am using PPrint in a situation where we have to be very careful what we log, how we log, and at which levels. As a result, in most cases I do something like this:
logger.debug("Value is {}", pprint.apply(myCaseClass))
The problem is that in terminals that can't read Fansi, I get stuff output like this because of toString (which calls render):
case class Foo(a: Int, b: String)
pprint.apply(Foo(5, "fdf"))
res0: fansi.Str = �[33mFoo�[39m(�[32m5�[39m, �[32m"fdf"�[39m)
And it shows up that way in Splunk.
Is there any guidance or, dare I say it, "best practices" for how best to integrate PPrint with SLF4J so that the output is as rich and clear as possible on both developer environments and logging machinery in higher environments?
Thanks.
The text was updated successfully, but these errors were encountered:
I am using PPrint in a situation where we have to be very careful what we log, how we log, and at which levels. As a result, in most cases I do something like this:
logger.debug("Value is {}", pprint.apply(myCaseClass))
The problem is that in terminals that can't read Fansi, I get stuff output like this because of
toString
(which callsrender
):And it shows up that way in Splunk.
Is there any guidance or, dare I say it, "best practices" for how best to integrate PPrint with SLF4J so that the output is as rich and clear as possible on both developer environments and logging machinery in higher environments?
Thanks.
The text was updated successfully, but these errors were encountered: