Skip to content

Commit 6260826

Browse files
Fixing SystemLogger formattedMessage bug (#10555)
1 parent 3ae77b4 commit 6260826

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/WebJobs.Script.WebHost/Diagnostics/SystemLogger.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Except
152152
// Apply standard event properties.
153153
// Note: we must be sure to default any null values to empty string
154154
// otherwise the ETW event will fail to be persisted (silently).
155-
string summary = formattedMessage ?? string.Empty;
156155
string eventName = !string.IsNullOrEmpty(eventId.Name) ? eventId.Name : stateEventName ?? string.Empty;
157156
eventName = isDiagnosticEvent ? $"DiagnosticEvent-{diagnosticEventErrorCode}" : eventName;
158157

@@ -178,7 +177,8 @@ public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Except
178177
formattedMessage = Sanitizer.Sanitize(formattedMessage);
179178
innerExceptionMessage = innerExceptionMessage ?? string.Empty;
180179
}
181-
_eventGenerator.LogFunctionTraceEvent(logLevel, subscriptionId, appName, functionName, eventName, source, details, summary, innerExceptionType, innerExceptionMessage, invocationId, _hostInstanceId, activityId, runtimeSiteName, slotName, DateTime.UtcNow);
180+
181+
_eventGenerator.LogFunctionTraceEvent(logLevel, subscriptionId, appName, functionName, eventName, source, details, formattedMessage, innerExceptionType, innerExceptionMessage, invocationId, _hostInstanceId, activityId, runtimeSiteName, slotName, DateTime.UtcNow);
182182
}
183183
}
184184
}

0 commit comments

Comments
 (0)