[
https://issues.apache.org/jira/browse/LOG4NET-76?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102708#comment-13102708
]
Stefan Bodewig commented on LOG4NET-76:
---------------------------------------
The problem here is similar to LOG4NET-212 where an instance variable is
modified by concurrent threads.
I'd say ProtectCloseTextWriter's Attach method is evil and TextwriterAdapter's
m_writer should be readonly, but that would break too many APIs.
Other than with LOG4NET-212 I don't intend to keep the instance member and add
synchronization but will rather remove the instance member completely.
I don't think the stack would really solve the problem, maybe make it surface
less often.
> TextWriterAdapter is not thread safe
> ------------------------------------
>
> Key: LOG4NET-76
> URL: https://issues.apache.org/jira/browse/LOG4NET-76
> Project: Log4net
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.10
> Environment: Windows XP Pro sp2 with .Net 2
> Reporter: Bob Peterson
> Priority: Minor
> Fix For: 1.2.11
>
> Attachments: TextWriterAdapter.cs
>
>
> When logging using the XmlAppender, our company application can generate
> overlapping appender calls. TextWriterAppender is not thread safe.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira