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 Rob Oxspring <ro...@imapmail.org> on 2005/07/11 15:16:14 UTC

[PATCH] XmlLayout should escape < and > in classnames

Hi,

We've stumbled across a scenario where the location information comes out with 
  the method set to java and the classname ending with <init>.  The problem 
occurs only after the first few calls to the constructors in question and 
we've only seen it on Aix under IBM's jre 1.4.0 - the suspicion is that their 
JIT is kicking in and messing the information up.  Obviously, with this 
problem in place the likes of Chainsaw get very confused when trying to 
process the 'xml'.

The attached patch attempts to fix this by simply applying the same escaping 
mechanism to the classname as to the method name.  If you could let me know 
what you guys think (any chance of inclusion in 1.2.12???) it would be much 
appreciated.

Thanks,

Rob

Re: [PATCH] XmlLayout should escape < and > in classnames

Posted by Rob Oxspring <ro...@imapmail.org>.
Done: http://issues.apache.org/bugzilla/show_bug.cgi?id=35691

Thanks,

Rob

Mark Womack wrote:
> Rob,
> 
> Can you create a bug with the patch?
> 
> Thanks,
> -Mark
> 
> 
>>-----Original Message-----
>>From: Curt Arnold [mailto:carnold@apache.org]
>>Sent: Monday, July 11, 2005 8:11 AM
>>To: Log4J Developers List
>>Subject: Re: [PATCH] XmlLayout should escape < and > in classnames
>>
>>
>>On Jul 11, 2005, at 8:16 AM, Rob Oxspring wrote:
>>
>>
>>>Hi,
>>>
>>>We've stumbled across a scenario where the location information
>>>comes out with  the method set to java and the classname ending
>>>with <init>.  The problem occurs only after the first few calls to
>>>the constructors in question and we've only seen it on Aix under
>>>IBM's jre 1.4.0 - the suspicion is that their JIT is kicking in and
>>>messing the information up.  Obviously, with this problem in place
>>>the likes of Chainsaw get very confused when trying to process the
>>>'xml'.
>>>
>>>The attached patch attempts to fix this by simply applying the same
>>>escaping mechanism to the classname as to the method name.  If you
>>>could let me know what you guys think (any chance of inclusion in
>>>1.2.12???) it would be much appreciated.
>>>
>>>Thanks,
>>
>>There are a decent number of scenarios where the current XMLLayout
>>will generate non-wellformed XML. I had logged bug 34875 (http://
>>issues.apache.org/bugzilla/show_bug.cgi?id=34875) to serve as a TO-DO
>>item to fix it in log4j 1.3, however fixing all the potential
>>problems and the companion bug 34874 is a little bigger than what I'd
>>be comfortable doing in the log4j 1.2 branch.  However, just fixing
>>the issue you raised in the message is probably appropriate for the
>>log4j 1.2 branch.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>For additional commands, e-mail: log4j-dev-help@logging.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


RE: [PATCH] XmlLayout should escape < and > in classnames

Posted by Mark Womack <wo...@adobe.com>.
Rob,

Can you create a bug with the patch?

Thanks,
-Mark

> -----Original Message-----
> From: Curt Arnold [mailto:carnold@apache.org]
> Sent: Monday, July 11, 2005 8:11 AM
> To: Log4J Developers List
> Subject: Re: [PATCH] XmlLayout should escape < and > in classnames
> 
> 
> On Jul 11, 2005, at 8:16 AM, Rob Oxspring wrote:
> 
> > Hi,
> >
> > We've stumbled across a scenario where the location information
> > comes out with  the method set to java and the classname ending
> > with <init>.  The problem occurs only after the first few calls to
> > the constructors in question and we've only seen it on Aix under
> > IBM's jre 1.4.0 - the suspicion is that their JIT is kicking in and
> > messing the information up.  Obviously, with this problem in place
> > the likes of Chainsaw get very confused when trying to process the
> > 'xml'.
> >
> > The attached patch attempts to fix this by simply applying the same
> > escaping mechanism to the classname as to the method name.  If you
> > could let me know what you guys think (any chance of inclusion in
> > 1.2.12???) it would be much appreciated.
> >
> > Thanks,
> 
> There are a decent number of scenarios where the current XMLLayout
> will generate non-wellformed XML. I had logged bug 34875 (http://
> issues.apache.org/bugzilla/show_bug.cgi?id=34875) to serve as a TO-DO
> item to fix it in log4j 1.3, however fixing all the potential
> problems and the companion bug 34874 is a little bigger than what I'd
> be comfortable doing in the log4j 1.2 branch.  However, just fixing
> the issue you raised in the message is probably appropriate for the
> log4j 1.2 branch.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: [PATCH] XmlLayout should escape < and > in classnames

Posted by Curt Arnold <ca...@apache.org>.
On Jul 11, 2005, at 8:16 AM, Rob Oxspring wrote:

> Hi,
>
> We've stumbled across a scenario where the location information  
> comes out with  the method set to java and the classname ending  
> with <init>.  The problem occurs only after the first few calls to  
> the constructors in question and we've only seen it on Aix under  
> IBM's jre 1.4.0 - the suspicion is that their JIT is kicking in and  
> messing the information up.  Obviously, with this problem in place  
> the likes of Chainsaw get very confused when trying to process the  
> 'xml'.
>
> The attached patch attempts to fix this by simply applying the same  
> escaping mechanism to the classname as to the method name.  If you  
> could let me know what you guys think (any chance of inclusion in  
> 1.2.12???) it would be much appreciated.
>
> Thanks,

There are a decent number of scenarios where the current XMLLayout  
will generate non-wellformed XML. I had logged bug 34875 (http:// 
issues.apache.org/bugzilla/show_bug.cgi?id=34875) to serve as a TO-DO  
item to fix it in log4j 1.3, however fixing all the potential  
problems and the companion bug 34874 is a little bigger than what I'd  
be comfortable doing in the log4j 1.2 branch.  However, just fixing  
the issue you raised in the message is probably appropriate for the  
log4j 1.2 branch.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org