You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Gary Gregory <ga...@gmail.com> on 2015/08/09 22:11:52 UTC

Core Marker toString redux

I think I've broached this topic a while ago but I still do not have a
solution.

When I use a Core marker in a pattern layout, the toString() I get is
pretty ugly, _especially_ if the marker has a parent. Nested [ ]'s, very
hard to read, looks nasty in a text log.

My markers do not have multiple inheritance so I would be happy with
a Parent0.Parent1.Leaf toString.

(1) Should the toString be smart and detect a simple single parent
hierarchy? Or (2) should I use a new kind of marker that only supports a
single parent.

I'm leaning toward (2). Should this be in the core?

Gary

-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
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