logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1405157 - /logging/log4j/log4j2/trunk/src/site/xdoc/manual/layouts.xml
Date Fri, 02 Nov 2012 20:45:59 GMT
Author: ggregory
Date: Fri Nov  2 20:45:59 2012
New Revision: 1405157

URL: http://svn.apache.org/viewvc?rev=1405157&view=rev
More %highlight documentation.


Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/layouts.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/layouts.xml?rev=1405157&r1=1405156&r2=1405157&view=diff
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/layouts.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/layouts.xml Fri Nov  2 20:45:59 2012
@@ -374,6 +374,12 @@ WARN  [main]: Message 2</pre>
                 <p>You can override the default colors in the optional {style} option.
For example:
                  <pre>%highlight{%d [%t] %-5level: %msg%n%throwable}{FATAL=white, ERROR=red,
WARN=blue, INFO=black, DEBUG=green, TRACE=blue}</pre>
+                <p>You can highlight only the a portion of the log event:
+                 <pre>%d [%t] %highlight{%-5level: %msg%n%throwable}</pre>
+                </p>
+                <p>You can style one part of the message and highlight the rest the
log event:
+                 <pre>%style{%d [%t]}{black} %highlight{%-5level: %msg%n%throwable}</pre>
+                </p>
                 <p>You can also use the STYLE key to use a predefined group of colors:
                  <pre>%highlight{%d [%t] %-5level: %msg%n%throwable}{STYLE=Logback}</pre>
                  The STYLE value can be one of:

View raw message