You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by "Thorsten Schöning (JIRA)" <lo...@logging.apache.org> on 2014/02/10 16:20:25 UTC
[jira] [Resolved] (LOGCXX-394) Levels are not thread safe
[ https://issues.apache.org/jira/browse/LOGCXX-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thorsten Schöning resolved LOGCXX-394.
--------------------------------------
Resolution: Fixed
I fixed this by removing static.
> Levels are not thread safe
> --------------------------
>
> Key: LOGCXX-394
> URL: https://issues.apache.org/jira/browse/LOGCXX-394
> Project: Log4cxx
> Issue Type: Bug
> Components: Appender
> Environment: Windows 7, Visual Studio 2010 SP1
> Reporter: Petro Protsyk
> Assignee: Curt Arnold
> Priority: Minor
> Labels: thread-safety
>
> Level.cpp. All default level variables are function static. This is not thread safe, especially in Visual C++ compiler.
> Here is code to reproduce the issue in VC++ 2010:
> Concurrency::parallel_for (int(0), int(10), [&](int i)
> {
> if (::log4cxx::Level::getWarn() == NULL)
> {
> throw std::exception();
> }
> });
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)