logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1152) Add %oneLine to PatternLayout to mask line breaks for easier processing of log messages
Date Wed, 07 Oct 2015 19:39:26 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-1152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14947448#comment-14947448
] 

Gary Gregory commented on LOG4J2-1152:
--------------------------------------

I could see a converter that hides {[\r\n]{1,2}} like %replaceEol{...}{> } where I can
put whatever I want as the replacement text. " |>> " is just too weird to use as a default,
I'd probably use the empty string as the default.

I still think having an option on the throwable converter for EOLs is a good idea.

Further thoughts?

> 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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message