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

Ralph Goers edited comment on LOG4J2-1220 at 12/11/15 1:52 PM:
---------------------------------------------------------------

If I had to guess I would suppose that the session id from the first message is 
from the prior session on that thread, that the ThreadContext wasn't cleared at 
the end of the request, and the new session id hasn't been set into the 
ThreadContext yet.


was (Author: [email protected]):
If I had to guess I would suppose that the session id from the first request is 
from the prior session on that thread, that the ThreadContext wasn't cleared at 
the end of the request, and the new session id hasn't been set into the 
ThreadContext yet.

> Thread context value is different for same thread.
> --------------------------------------------------
>
>                 Key: LOG4J2-1220
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1220
>             Project: Log4j 2
>          Issue Type: Bug
>         Environment: Production
>            Reporter: sivan
>
> I am adding session id in the thread context of log4j2. As per the document 
> thread context value will be same for one thread. But I am getting different 
> values in a single thread.
> Please see the log entry for the same thread "ajp-apr-8109-exec-17".
> Second value is the session id from Thread Context and is logging as 
> different for the same thread.
> Log pattern
> <property name="logPattern">%c|%K{sessionId}|%t|%d{MM/dd/yyyy 
> HH:mm:ss.SSS}|%p|%C|%M|%L|%K{msg}%n</property>
> Log Entry from Log file
> logtype.webservice|65B52415CE143C27B27CA05B4DBA0B07|ajp-apr-8109-exec-17|12/11/2015
>  01:14:17.117|INFO|com.mmp.servlets.srvProcessRequest|doPost|129|Web Service 
> Request:
> logtype.webservice|0C4443F3C61C369F794F1FEB23AAC882|ajp-apr-8109-exec-17|12/11/2015
>  01:14:22.203|INFO|com.mmp.servlets.srvProcessRequest|addTimeLog|286|Start 
> Time: 1449818057117
> logtype.webservice|0C4443F3C61C369F794F1FEB23AAC882|ajp-apr-8109-exec-17|12/11/2015
>  01:14:22.203|INFO|com.mmp.servlets.srvProcessRequest|addTimeLog|287|End 
> Time: 1449818062203
> logtype.webservice|0C4443F3C61C369F794F1FEB23AAC882|ajp-apr-8109-exec-17|12/11/2015
>  01:14:22.203|INFO|com.mmp.servlets.srvProcessRequest|addTimeLog|288|Elapsed 
> Time: 5.086s



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to