Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/NLogPublic

Commita27d341

Browse files
authored
Target also enforce PreventMultipleCalls when WriteFailedNotInitialized (#6044)
1 parenta8fb527 commita27d341

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/NLog/Targets/Target.cs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,17 +316,18 @@ public void WriteAsyncLogEvent(AsyncLogEventInfo logEvent)
316316
return;
317317
}
318318

319+
varwrappedContinuation=AsyncHelpers.PreventMultipleCalls(logEvent.Continuation);
320+
varwrappedLogEvent=logEvent.LogEvent.WithContinuation(wrappedContinuation);
321+
319322
if(_initializeException!=null)
320323
{
321324
lock(SyncRoot)
322325
{
323-
WriteFailedNotInitialized(logEvent,_initializeException);
326+
WriteFailedNotInitialized(wrappedLogEvent,_initializeException);
324327
}
325328
return;
326329
}
327330

328-
varwrappedContinuation=AsyncHelpers.PreventMultipleCalls(logEvent.Continuation);
329-
varwrappedLogEvent=logEvent.LogEvent.WithContinuation(wrappedContinuation);
330331
try
331332
{
332333
WriteAsyncThreadSafe(wrappedLogEvent);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp