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 "Ralph Goers (JIRA)" <ji...@apache.org> on 2015/12/11 14:53:11 UTC
[jira] [Comment Edited] (LOG4J2-1220) Thread context value is
different for same thread.
[ 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 request's 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: ralph.goers@dslextreme.com):
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.
> 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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org