Re: Pattern layout and Markers

2015-10-05 Thread Gary Gregory
Well, it's in Git master now ... Gary On Mon, Oct 5, 2015 at 1:00 AM, Mikael Ståldal wrote: > Yes, and this is such a case (since Gary wrote "Feedback please"), isn't > it? > > On Fri, Oct 2, 2015 at 5:55 PM, Ralph Goers > wrote: > >> Mikael, we generally only create code branches when we have

Re: Pattern layout and Markers

2015-10-05 Thread Mikael Ståldal
Yes, and this is such a case (since Gary wrote "Feedback please"), isn't it? On Fri, Oct 2, 2015 at 5:55 PM, Ralph Goers wrote: > Mikael, we generally only create code branches when we have things that we > would like feedback on before we commit them to master. Frankly, I do my > code reviews u

Re: Pattern layout and Markers

2015-10-02 Thread Gary Gregory
Review away! ;-) Gary On Fri, Oct 2, 2015 at 8:55 AM, Ralph Goers wrote: > Mikael, we generally only create code branches when we have things that we > would like feedback on before we commit them to master. Frankly, I do my > code reviews using the emails from git. At least 80% of Gary’s comm

Re: Pattern layout and Markers

2015-10-02 Thread Ralph Goers
Mikael, we generally only create code branches when we have things that we would like feedback on before we commit them to master. Frankly, I do my code reviews using the emails from git. At least 80% of Gary’s commits are just code “cleanups” so are easy to look at - he is pretty good at separ

Re: Pattern layout and Markers

2015-10-02 Thread Mikael Ståldal
I think it will be easier to do code review if you make a branch in Git, rather than uploading a diff. On Fri, Oct 2, 2015 at 1:05 AM, Gary Gregory wrote: > Feedback please: https://issues.apache.org/jira/browse/LOG4J2-1146 > > Note the addition of the isVariable() method. > > Gary > > On Wed, S

Re: Pattern layout and Markers

2015-10-01 Thread Gary Gregory
Feedback please: https://issues.apache.org/jira/browse/LOG4J2-1146 Note the addition of the isVariable() method. Gary On Wed, Sep 30, 2015 at 7:45 PM, Ralph Goers wrote: > Topic 1 > > This is quite a common use case. I have no problem with %equals but > %notEmpty{[%marker]} would be nicer for

Re: Pattern layout and Markers

2015-10-01 Thread Gary Gregory
So, silly example: %notEmpty{<%marker>%msg} would only print if marker AND msg are not empty? Gary On Wed, Sep 30, 2015 at 7:45 PM, Ralph Goers 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

Re: Pattern layout and Markers

2015-10-01 Thread Gary Gregory
I did %equals, I'll take a look at %notEmpty... On Wed, Sep 30, 2015 at 5:15 PM, Gary Gregory 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 > look

Re: Pattern layout and Markers

2015-10-01 Thread Gary Gregory
Looking back at the code and unit test, the intent is clear to print out the FQN of the marker, so I'll leave that as is but add getFullName() method. I'll add a %markerName for the a converter that just does a getName(). Gary On Thu, Oct 1, 2015 at 3:26 AM, Remko Popma wrote: > About printing

Re: Pattern layout and Markers

2015-10-01 Thread Remko Popma
About printing the Marker NAME instead of toString(), this sounds reasonable (but to be honest I have never used Markers so I am no expert). On Thu, Oct 1, 2015 at 8:30 AM, Gary Gregory wrote: > I was in the middle of addressing the easier of my topics by creating a > new class MarkerNamePattern

Re: Pattern layout and Markers

2015-10-01 Thread Mikael Ståldal
I like %nonEmpty{[%marker]} On Thu, Oct 1, 2015 at 4:45 AM, Ralph Goers 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 emp

Re: Pattern layout and Markers

2015-09-30 Thread Gary Gregory
I was in the middle of addressing the easier of my topics by creating a new class MarkerNamePatternConverter and unit test when I looked at our current %marker docs that say: "The name of the marker, if one is present." So I'm going to call our current implementation a bug because we do NOT use t

Re: Pattern layout and Markers

2015-09-30 Thread Ralph Goers
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 wrote: > > Topic 1 > >

Pattern layout and Markers

2015-09-30 Thread Gary Gregory
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{[%