Right now if I say %marker and I have the following:
public static Marker SQL = createMarker("DV.SQL");
public static Marker SQL_QUERY =
createMarker("DV.SQL.QUERY").setParents(SQL);
public static Marker SQL_UPDATE =
createMarker("DV.SQL.UPDATE").setParents(SQL);
createMarker(...)
When I log with SQL_QUERY I am going to get in my log:
DV.SQL.QUERY[ DV.SQL ]
which I claim is pretty _lame_. I should only see "DV.SQL.QUERY"
Then I have:
<PatternLayout noConsoleNoAnsi="true"
pattern="%style{%d}{black} [DV][JDBC
Driver]%style{[%t]}{blue}[%marker] %style{%-5level:}{yellow}
%style{%msg%n%throwable}{green}" />
If I am NOT logging with a marker I get "[]" for each log event. Any
thoughts on supporting only printing out the marker if there is one with
something like "%marker{[%marker]}"
Gary
--
E-Mail: [email protected] | [email protected]
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory