logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LOG4J2-626) ThreadContext for Asynchronous logger in multithreaded environmant is overwriting the values.
Date Wed, 30 Apr 2014 12:37:14 GMT

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

Remko Popma edited comment on LOG4J2-626 at 4/30/14 12:36 PM:
--------------------------------------------------------------

Log4j classes will _read_ values from the ThreadContext map or stack, but it will not modify
them.
I suspect this is a bug in the application...

Can you reliably reproduce the problem? What are you seeing and what did you expect to see?
Are all key value pairs modified or only some (which ones, when)?



was (Author: remkop@yahoo.com):
Sorry but this is not enough information to even start investigating. 
Please update the problem description with:
1. Steps to reproduce the problem
2. What is actually happening
3. What you expect to happen

> ThreadContext for Asynchronous logger in multithreaded environmant is overwriting the
values.
> ---------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-626
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-626
>             Project: Log4j 2
>          Issue Type: Question
>          Components: API
>    Affects Versions: 2.0-rc1
>         Environment: java 7
>            Reporter: sivan
>
> ThreadContext for Asynchronous loggers in multithreaded environmant is overwriting the
values. Is there is any way to use the custom key value pairs in such an environment?
> The log4j2 document says that the values in threadcontext may overwrite by asynchronous
logging in multithreaded envirnment. We are implemented the log4j2 asynchronous logging in
our single sign on (SSO) framework and the threadcontext is used to store some parameter values
like sessionId, firm, user etc and these values needs to be included in the log entry. At
a time many users will log into our site by using SSO. Is the threadcontext values will change
by asynchronous logging in multithreaded envirnment? If so, is there any other way to store
these values in thread safe manner?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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


Mime
View raw message