I'm trying to format stacktrace printed by Log4j2 so that the separator isn't the default new line but rather a tab (\t). I did basically what was advised here: How to format stacktrace in log4j2?
In the pattern I am able to use non-special characters, for example: %xwEx{separator(|)}
will result in stack trace lines being separated by pipeline character.
However if I try this: %xwEx{separator(\t)}
stacktrace lines aren't separated by a tab but a "\t" String like so:
java.lang.NullPointerException: error enovountered at ... \t at ... \t at ...
I tried using double backslash \\t
but it didn't solve my problem. Is there a way to pass special characters like \t
as the separator argument?