[ 
https://issues.apache.org/jira/browse/LOG4J2-1155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14948647#comment-14948647
 ] 

Remko Popma edited comment on LOG4J2-1155 at 10/8/15 5:48 PM:
--------------------------------------------------------------

the editor convert what i wrote cause the problem is log4j2 convert  < only to 
html code in log file 

{code}
<Event xmlns="http://logging.apache.org/log4j/2.0/events"; 
timeMillis="1443621318068" thread="[ACTIVE] ExecuteThread: '7' for queue: 
'weblogic.kernel.Default (self-tuning)'" level="DEBUG" 
loggerName="com.egyptianbanks.ecm.interfaces.Base24Interface" 
endOfBatch="false" loggerFqcn="org.apache.logging.log4j.spi.AbstractLogger">
  <Message>[ApplicationTimeStamp : 2015-09-30 15:55:18.0068]  Processing ISO 
Request:
&ltISOMessage direction=incoming>
        &ltField_0>0200&lt/Field_0>
        &ltField_3>000000000&lt/Field_3>
        &ltField_4>000000000&lt/Field_4>
        &ltField_7>000000000&lt/Field_7>
        &ltField_11>000000000&lt/Field_11>
        &ltField_12>000000000&lt/Field_12>
        &ltField_13>000000000&lt/Field_13>
        &ltField_17>000000000&lt/Field_17>
        &ltField_32>000000000&lt/Field_32>
        &ltField_35>000000000&lt/Field_35>
        &ltField_37>000000000462&lt/Field_37>
        &ltField_41>7000&lt/Field_41>
        &ltField_43>CAI EG&lt/Field_43>
        &ltField_48>00000000000000000000000000000000000000000000&lt/Field_48>
        &ltField_49>818&lt/Field_49>
        &ltField_52>000000000&lt/Field_52>
        &ltField_60>000000000+000&lt/Field_60>
        &ltField_103>01000000000&lt/Field_103>
        &ltField_256>base24&lt/Field_256>
        &ltField_257>000000000&lt/Field_257>
&lt/ISOMessage>
{code}
as you see the problem is all open tags "<" converted to "&lt" automatically 
and when i debug the message contain valid format < instead of &lt the problem 
is with library


was (Author: a.attar):
the editor convert what i wrote cause the problem is log4j2 convert  < only to 
html code in log file 

<Event xmlns="http://logging.apache.org/log4j/2.0/events"; 
timeMillis="1443621318068" thread="[ACTIVE] ExecuteThread: '7' for queue: 
'weblogic.kernel.Default (self-tuning)'" level="DEBUG" 
loggerName="com.egyptianbanks.ecm.interfaces.Base24Interface" 
endOfBatch="false" loggerFqcn="org.apache.logging.log4j.spi.AbstractLogger">
  <Message>[ApplicationTimeStamp : 2015-09-30 15:55:18.0068]  Processing ISO 
Request:
&ltISOMessage direction=incoming>
        &ltField_0>0200&lt/Field_0>
        &ltField_3>000000000&lt/Field_3>
        &ltField_4>000000000&lt/Field_4>
        &ltField_7>000000000&lt/Field_7>
        &ltField_11>000000000&lt/Field_11>
        &ltField_12>000000000&lt/Field_12>
        &ltField_13>000000000&lt/Field_13>
        &ltField_17>000000000&lt/Field_17>
        &ltField_32>000000000&lt/Field_32>
        &ltField_35>000000000&lt/Field_35>
        &ltField_37>000000000462&lt/Field_37>
        &ltField_41>7000&lt/Field_41>
        &ltField_43>CAI EG&lt/Field_43>
        &ltField_48>00000000000000000000000000000000000000000000&lt/Field_48>
        &ltField_49>818&lt/Field_49>
        &ltField_52>000000000&lt/Field_52>
        &ltField_60>000000000+000&lt/Field_60>
        &ltField_103>01000000000&lt/Field_103>
        &ltField_256>base24&lt/Field_256>
        &ltField_257>000000000&lt/Field_257>
&lt/ISOMessage>
as you see the problem is all open tags "<" converted to "&lt" automatically 
and when i debug the message contain valid format < instead of &lt the problem 
is with library

> XML fromat in log file using XMLLayout
> --------------------------------------
>
>                 Key: LOG4J2-1155
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1155
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Layouts
>    Affects Versions: 2.4
>         Environment: weblogic container 
>            Reporter: ahmed elattar
>            Priority: Critical
>
> hi i am using log4j2 and the problem is when i use 
> event.getLog4jLogger().debug(event.getMessage());
> any xml in message  log file created like below
> {code}
> <Event xmlns="http://logging.apache.org/log4j/2.0/events"; 
> timeMillis="1443621318068" thread="[ACTIVE] ExecuteThread: '7' for queue: 
> 'weblogic.kernel.Default (self-tuning)'" level="DEBUG" 
> loggerName="com.egyptianbanks.ecm.interfaces.Base24Interface" 
> endOfBatch="false" loggerFqcn="org.apache.logging.log4j.spi.AbstractLogger">
>   <Message>[ApplicationTimeStamp : 2015-09-30 15:55:18.0068]  Processing ISO 
> Request:
> &lt;ISOMessage direction=incoming>
>       &lt;Field_0>0200&lt;/Field_0>
>       &lt;Field_3>000000000&lt;/Field_3>
>       &lt;Field_4>000000000&lt;/Field_4>
>       &lt;Field_7>000000000&lt;/Field_7>
>       &lt;Field_11>000000000&lt;/Field_11>
>       &lt;Field_12>000000000&lt;/Field_12>
>       &lt;Field_13>000000000&lt;/Field_13>
>       &lt;Field_17>000000000&lt;/Field_17>
>       &lt;Field_32>000000000&lt;/Field_32>
>       &lt;Field_35>000000000&lt;/Field_35>
>       &lt;Field_37>000000000462&lt;/Field_37>
>       &lt;Field_41>7000&lt;/Field_41>
>       &lt;Field_43>CAI EG&lt;/Field_43>
>       &lt;Field_48>00000000000000000000000000000000000000000000&lt;/Field_48>
>       &lt;Field_49>818&lt;/Field_49>
>       &lt;Field_52>000000000&lt;/Field_52>
>       &lt;Field_60>000000000+000&lt;/Field_60>
>       &lt;Field_103>01000000000&lt;/Field_103>
>       &lt;Field_256>base24&lt;/Field_256>
>       &lt;Field_257>000000000&lt;/Field_257>
> &lt;/ISOMessage>
> {code}
> as you see the problem is all open tags "<" converted to "&lt;" automatically 
> and when i debug the message contain valid format < instead of &lt; the 
> problem is with library



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to