You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by John Bush <jo...@gmail.com> on 2016/04/11 22:53:04 UTC
jsonlayout contextMap
If you are frustrated by how the ootb JsonLayout handles context data, see
https://issues.apache.org/jira/browse/LOG4J2-623
I've published how I worked around it here:
https://github.com/johntbush/log4j2-jsonlayout
Re: jsonlayout contextMap
Posted by Ralph Goers <ra...@dslextreme.com>.
If you are going to validate JSON you would do it with a JSON schema, not an XML schema. From what I understand almost nobody does it. So the answer to your question is that it doesn’t need an answer because it isn’t required.
Ralph
> On Apr 12, 2016, at 11:31 AM, Gary Gregory <ga...@gmail.com> wrote:
>
> I still do not see how this can be changed AND still have the ability to
> generically validate log events as I asked in
> https://issues.apache.org/jira/browse/LOG4J2-623?focusedCommentId=13995487&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13995487
>
> Gary
>
> On Mon, Apr 11, 2016 at 11:22 PM, Ralph Goers <ra...@dslextreme.com>
> wrote:
>
>> Gary,
>>
>> I am not sure how this got implemented this way despite me objecting and
>> saying it was wrong. Please fix it.
>>
>> Ralph
>>
>>> On Apr 11, 2016, at 2:30 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>>>
>>> You'll see if a toggle or a new appender makes sense depending on how
>> much
>>> code disruption this causes.
>>>
>>> Keep in mind that the Jackson-based appenders work for JSON, XML, and
>> YAML
>>> formats.
>>>
>>> Make sure you base on work on the latest from Git master.
>>>
>>> Good luck!
>>> Gary
>>>
>>> On Mon, Apr 11, 2016 at 2:26 PM, John Bush <jo...@gmail.com>
>> wrote:
>>>
>>>> lol, well see, now I know you read it. Sorry, I'm just kinda like
>> that...
>>>>
>>>> But seriously I can probably whip up a patch for a toggle, that sounds
>> like
>>>> a reasonable approach.
>>>>
>>>> On Mon, Apr 11, 2016 at 1:57 PM, Gary Gregory <ga...@gmail.com>
>>>> wrote:
>>>>
>>>>> "They are also Java nazi's" [sic]?
>>>>>
>>>>> Really? Is that necessary?
>>>>>
>>>>> How about providing a patch for either an alternate JSON layout or a
>>>> toggle
>>>>> on the current layout?
>>>>>
>>>>> That would sure be more productive that name calling.
>>>>>
>>>>> Gary
>>>>>
>>>>> On Mon, Apr 11, 2016 at 1:53 PM, John Bush <jo...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> If you are frustrated by how the ootb JsonLayout handles context data,
>>>>> see
>>>>>> https://issues.apache.org/jira/browse/LOG4J2-623
>>>>>>
>>>>>> I've published how I worked around it here:
>>>>>> https://github.com/johntbush/log4j2-jsonlayout
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> 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
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> 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
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
>
>
> --
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: jsonlayout contextMap
Posted by Gary Gregory <ga...@gmail.com>.
I still do not see how this can be changed AND still have the ability to
generically validate log events as I asked in
https://issues.apache.org/jira/browse/LOG4J2-623?focusedCommentId=13995487&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13995487
Gary
On Mon, Apr 11, 2016 at 11:22 PM, Ralph Goers <ra...@dslextreme.com>
wrote:
> Gary,
>
> I am not sure how this got implemented this way despite me objecting and
> saying it was wrong. Please fix it.
>
> Ralph
>
> > On Apr 11, 2016, at 2:30 PM, Gary Gregory <ga...@gmail.com>
> wrote:
> >
> > You'll see if a toggle or a new appender makes sense depending on how
> much
> > code disruption this causes.
> >
> > Keep in mind that the Jackson-based appenders work for JSON, XML, and
> YAML
> > formats.
> >
> > Make sure you base on work on the latest from Git master.
> >
> > Good luck!
> > Gary
> >
> > On Mon, Apr 11, 2016 at 2:26 PM, John Bush <jo...@gmail.com>
> wrote:
> >
> >> lol, well see, now I know you read it. Sorry, I'm just kinda like
> that...
> >>
> >> But seriously I can probably whip up a patch for a toggle, that sounds
> like
> >> a reasonable approach.
> >>
> >> On Mon, Apr 11, 2016 at 1:57 PM, Gary Gregory <ga...@gmail.com>
> >> wrote:
> >>
> >>> "They are also Java nazi's" [sic]?
> >>>
> >>> Really? Is that necessary?
> >>>
> >>> How about providing a patch for either an alternate JSON layout or a
> >> toggle
> >>> on the current layout?
> >>>
> >>> That would sure be more productive that name calling.
> >>>
> >>> Gary
> >>>
> >>> On Mon, Apr 11, 2016 at 1:53 PM, John Bush <jo...@gmail.com>
> >>> wrote:
> >>>
> >>>> If you are frustrated by how the ootb JsonLayout handles context data,
> >>> see
> >>>> https://issues.apache.org/jira/browse/LOG4J2-623
> >>>>
> >>>> I've published how I worked around it here:
> >>>> https://github.com/johntbush/log4j2-jsonlayout
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> 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
> >>>
> >>
> >
> >
> >
> > --
> > 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
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
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
Re: jsonlayout contextMap
Posted by Ralph Goers <ra...@dslextreme.com>.
Gary,
I am not sure how this got implemented this way despite me objecting and saying it was wrong. Please fix it.
Ralph
> On Apr 11, 2016, at 2:30 PM, Gary Gregory <ga...@gmail.com> wrote:
>
> You'll see if a toggle or a new appender makes sense depending on how much
> code disruption this causes.
>
> Keep in mind that the Jackson-based appenders work for JSON, XML, and YAML
> formats.
>
> Make sure you base on work on the latest from Git master.
>
> Good luck!
> Gary
>
> On Mon, Apr 11, 2016 at 2:26 PM, John Bush <jo...@gmail.com> wrote:
>
>> lol, well see, now I know you read it. Sorry, I'm just kinda like that...
>>
>> But seriously I can probably whip up a patch for a toggle, that sounds like
>> a reasonable approach.
>>
>> On Mon, Apr 11, 2016 at 1:57 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>>
>>> "They are also Java nazi's" [sic]?
>>>
>>> Really? Is that necessary?
>>>
>>> How about providing a patch for either an alternate JSON layout or a
>> toggle
>>> on the current layout?
>>>
>>> That would sure be more productive that name calling.
>>>
>>> Gary
>>>
>>> On Mon, Apr 11, 2016 at 1:53 PM, John Bush <jo...@gmail.com>
>>> wrote:
>>>
>>>> If you are frustrated by how the ootb JsonLayout handles context data,
>>> see
>>>> https://issues.apache.org/jira/browse/LOG4J2-623
>>>>
>>>> I've published how I worked around it here:
>>>> https://github.com/johntbush/log4j2-jsonlayout
>>>>
>>>
>>>
>>>
>>> --
>>> 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
>>>
>>
>
>
>
> --
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: jsonlayout contextMap
Posted by Gary Gregory <ga...@gmail.com>.
You'll see if a toggle or a new appender makes sense depending on how much
code disruption this causes.
Keep in mind that the Jackson-based appenders work for JSON, XML, and YAML
formats.
Make sure you base on work on the latest from Git master.
Good luck!
Gary
On Mon, Apr 11, 2016 at 2:26 PM, John Bush <jo...@gmail.com> wrote:
> lol, well see, now I know you read it. Sorry, I'm just kinda like that...
>
> But seriously I can probably whip up a patch for a toggle, that sounds like
> a reasonable approach.
>
> On Mon, Apr 11, 2016 at 1:57 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>
> > "They are also Java nazi's" [sic]?
> >
> > Really? Is that necessary?
> >
> > How about providing a patch for either an alternate JSON layout or a
> toggle
> > on the current layout?
> >
> > That would sure be more productive that name calling.
> >
> > Gary
> >
> > On Mon, Apr 11, 2016 at 1:53 PM, John Bush <jo...@gmail.com>
> > wrote:
> >
> > > If you are frustrated by how the ootb JsonLayout handles context data,
> > see
> > > https://issues.apache.org/jira/browse/LOG4J2-623
> > >
> > > I've published how I worked around it here:
> > > https://github.com/johntbush/log4j2-jsonlayout
> > >
> >
> >
> >
> > --
> > 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
> >
>
--
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
Re: jsonlayout contextMap
Posted by John Bush <jo...@gmail.com>.
lol, well see, now I know you read it. Sorry, I'm just kinda like that...
But seriously I can probably whip up a patch for a toggle, that sounds like
a reasonable approach.
On Mon, Apr 11, 2016 at 1:57 PM, Gary Gregory <ga...@gmail.com>
wrote:
> "They are also Java nazi's" [sic]?
>
> Really? Is that necessary?
>
> How about providing a patch for either an alternate JSON layout or a toggle
> on the current layout?
>
> That would sure be more productive that name calling.
>
> Gary
>
> On Mon, Apr 11, 2016 at 1:53 PM, John Bush <jo...@gmail.com>
> wrote:
>
> > If you are frustrated by how the ootb JsonLayout handles context data,
> see
> > https://issues.apache.org/jira/browse/LOG4J2-623
> >
> > I've published how I worked around it here:
> > https://github.com/johntbush/log4j2-jsonlayout
> >
>
>
>
> --
> 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
>
Re: jsonlayout contextMap
Posted by Gary Gregory <ga...@gmail.com>.
"They are also Java nazi's" [sic]?
Really? Is that necessary?
How about providing a patch for either an alternate JSON layout or a toggle
on the current layout?
That would sure be more productive that name calling.
Gary
On Mon, Apr 11, 2016 at 1:53 PM, John Bush <jo...@gmail.com> wrote:
> If you are frustrated by how the ootb JsonLayout handles context data, see
> https://issues.apache.org/jira/browse/LOG4J2-623
>
> I've published how I worked around it here:
> https://github.com/johntbush/log4j2-jsonlayout
>
--
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