I like %nonEmpty{[%marker]}

On Thu, Oct 1, 2015 at 4:45 AM, Ralph Goers <ralph.go...@dslextreme.com>
wrote:

> Topic 1
>
> This is quite a common use case. I have no problem with %equals but
> %notEmpty{[%marker]} would be nicer for this use case - it would mean don’t
> print anything if the variables in the pattern are empty strings.
>
> Ralph
>
> On Sep 30, 2015, at 5:15 PM, Gary Gregory <garydgreg...@gmail.com> wrote:
>
> Topic 1
>
> Let's say I want my logs to look like this:
>
> Date [thread] [loggerName] [MarkerName] Message
>
> But most of the time I do not have a marker so I end up with a lot of lame
> looking log entries with [].
>
> Instead I'd rather see nothing.
>
> I could use a replace like this (not tested):
>
> %replace{[%marker]}{\[\]}{}
>
> But that seems 'expensive' and cryptic, the perfect combo ;-)
>
> Should we had a gadget so you can configure like:
>
> %equals{[%marker]}{[]}{}
>
> Which just does a String.equals instead of a RE match?
>
> Topic 2
>
> The toString on Markers are not nice when the marker has parents.
> Therefore, I'd like to add %simpleMarker (like there is a
> Class#getSimpleName). simpleMarker gets the name sans parents.
>
> Then I can say:
>
> %equals{[%simpleMarker]}{[]}{}
>
> Thoughts?
>
> --
> E-Mail: garydgreg...@gmail.com | ggreg...@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
>
>
>


-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.stal...@magine.com
Regeringsgatan 25  | 111 53 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Reply via email to