[
https://issues.apache.org/jira/browse/LOG4NET-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741796#action_12741796
]
Dag Christensen commented on LOG4NET-225:
-----------------------------------------
Without the lock, your sample code would be calling its own Appender
recursively with a stack overflow as result. Should work if your appender logs
to a different appender since the lock prevents appender reentry.
>From AppenderSkeleton.cs:
// This lock is absolutely critical for correct formatting
// of the message in a multi-threaded environment. Without
// this, the message may be broken up into elements from
// multiple thread contexts (like get the wrong thread ID).
lock(this)
{
(...)
> Multithreading and Deadlocks
> ----------------------------
>
> Key: LOG4NET-225
> URL: https://issues.apache.org/jira/browse/LOG4NET-225
> Project: Log4net
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 1.2.10
> Reporter: Thomas Haller
> Priority: Blocker
> Attachments: Log4NetDeadlock.zip
>
>
> If an Appender has to execute some logic on another thread,
> witch uses also log4net, this leads to a deadlock.
> The sample project i created demonstrates that problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.