rschmitt commented on issue #3873: URL: https://github.com/apache/logging-log4j2/issues/3873#issuecomment-3255247100
To give a concrete example, there are users with log-scanning regular expressions like: ``` (\[ERROR\]|\[TRACE\])(.*\"exception\":).*Error adding currency ``` It appears that multi-line regexes aren't supported. So this issue is best understood as a feature request against [exception properties](https://logging.apache.org/log4j/2.x/manual/pattern-layout.html#converter-exception-property), which are conceptually perfect for producing these types of lines in the logs: > In this mode, extracted attributes of the `Throwable` are injected verbatim. That is, no newlines, suffixes, prefixes, etc. will be added. We already have access to the message, so the only thing that's not exposed is the class name of the `Throwable`. It looks like this should be a simple addition to [`ThrowablePropertyRendererFactory`](https://github.com/apache/logging-log4j2/blob/2.x/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePropertyRendererFactory.java), if I'm not mistaken. Maybe we could add two properties, `short.throwableClassFullName` (corresponding to `Class::getName`) and `short.throwableClassShortName` (corresponding to `Class::getSimpleName`). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
