File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
src/Serilog.Extensions.Hosting Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public void AddOrUpdate(LogEventProperty property)
40
40
}
41
41
42
42
/// <summary>
43
- /// Set an exception to include in the Serilog request log event .
43
+ /// Set the exception associated with the current diagnostic context .
44
44
/// </summary>
45
45
/// <example>
46
46
/// Passing an exception to the diagnostic context is useful when unhandled exceptions are handled before reaching Serilog's
@@ -69,6 +69,7 @@ public void SetException(Exception exception)
69
69
/// <param name="properties">The collected properties, or null if no collection is active.</param>
70
70
/// <returns>True if properties could be collected.</returns>
71
71
/// <seealso cref="IDiagnosticContext.Set"/>
72
+ [ Obsolete ( "Replaced by TryComplete(out IEnumerable<LogEventProperty> properties, out Exception exception)." ) ]
72
73
public bool TryComplete ( out IEnumerable < LogEventProperty > properties )
73
74
{
74
75
return TryComplete ( out properties , out _ ) ;
Original file line number Diff line number Diff line change @@ -33,15 +33,13 @@ public interface IDiagnosticContext
33
33
34
34
/// <summary>
35
35
/// Set the specified exception on the current diagnostic context.
36
- /// <br/><br/>
37
- /// This is useful when unhandled exceptions do not reach <c>Serilog.AspNetCore.RequestLoggingMiddleware</c>,
38
- /// such as when using <a href="https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails">Hellang.Middleware.ProblemDetails</a>
39
- /// to transform exceptions to ProblemDetails responses.
40
36
/// </summary>
41
37
/// <remarks>
42
- /// If <c>null</c> is given, it clears any previously assigned exception.
38
+ /// This method is useful when unhandled exceptions do not reach <c>Serilog.AspNetCore.RequestLoggingMiddleware</c>,
39
+ /// such as when using <a href="https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails">Hellang.Middleware.ProblemDetails</a>
40
+ /// to transform exceptions to ProblemDetails responses.
43
41
/// </remarks>
44
- /// <param name="exception">The exception to log.</param>
42
+ /// <param name="exception">The exception to log. If <c>null</c> is given, it clears any previously assigned exception. </param>
45
43
void SetException ( Exception exception ) ;
46
44
}
47
45
}
You can’t perform that action at this time.
0 commit comments