Replies: 1 comment
-
I ended up adding a callback to rewrite formatted log messages. Here's the fix, if anyone is interested. github.com/gh-andre/fmtlog/commit/616c8ec7 See README in the patch branch for more information and a working example in https://github.com/gh-andre/fmtlog/tree/v2-2-1-patches#changes |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Consider this code, where
ABC\nXYZ
comes from some 3rd-party component, like an error message with a call stack dump.This will produce log lines that cannot be processed by log handlers because it contains arbitrary characters.
Is there a way to set up some callback where the message can be modified?
I'm looking for a callback similar to
fmtlog::setLogCB
, but which would allow to return a replacement formsg
, which would be used instead, but only if some indicator says that it was changed, like a\n
was found.Thanks
Beta Was this translation helpful? Give feedback.
All reactions