-
Is it possible to provide a layout to the status logger? When I get networking problems with my appender, it prints elaborate error messages with extensive stack traces, even though a simple "Unable to connect to TCP:127.0.0.1:1234560" would be enough. Is there a way to specify something like a PatternLayout for status logger, so that I could cut out the stack traces with a pattern "%m %eEx{0} %n"? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
No, it is not possible and, IMHO, this is a good thing. Status Logger is the logger for the logger – that is, we need to keep its feature set at minimum. Consider it like a
If this is an unexpected failure, it is good to point to the user the origin by means of a stack trace. If this is something regular, you might consider either introducing a rate limiter to the error messages you emit, or avoiding passing the same exception to the status logger in subsequent calls. |
Beta Was this translation helpful? Give feedback.
No, it is not possible and, IMHO, this is a good thing. Status Logger is the logger for the logger – that is, we need to keep its feature set at minimum. Consider it like a
printf()
on steroids.If this is an unexpected failure, it is good to point to the user the origin by means of a stack trace. If this is something regular, you might consider either introducing a rate limiter to the error messages you emit, or avoiding passing the same exception to the status logger in subsequent calls.