[
https://issues.apache.org/jira/browse/LOG4J2-1152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14949955#comment-14949955
]
Christian Möller commented on LOG4J2-1152:
------------------------------------------
Another note concerning the name of the converter:
* "oneLine" expresses the thing you want to achieve: Put the following
expression on one line. (How? OK, by replacing all the line breaks, but that is
not the main issue here).
* "replaceEol" expresses the technical operation to achieve it.
In general I prefer names expressing the goal of an operation over a name
describing how something is implemented on a technical level.
> Add %oneLine to PatternLayout to mask line breaks for easier processing of
> log messages
> ---------------------------------------------------------------------------------------
>
> Key: LOG4J2-1152
> URL: https://issues.apache.org/jira/browse/LOG4J2-1152
> Project: Log4j 2
> Issue Type: New Feature
> Components: Pattern Converters
> Reporter: Christian Möller
> Assignee: Gary Gregory
> Attachments: OneLinePatternConverter.java
>
>
> Adding %oneLine\{...\} to PatternLayout will mask line breaks of enclosed
> Strings as " |>> ". For instance, %oneline{%exception{full}} will convert
> stack traces to a one-liner easier to handle with tools like grep. Based on
> an idea of Heinz Kabutz: http://www.javaspecialists.eu/archive/Issue177.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]