public interface IExceptionLogger
A generic exception logger.
Namespace
Google.Cloud.Diagnostics.AspNetCore3Assembly
Google.Cloud.Diagnostics.AspNetCore3.dll
Methods
Log(Exception, HttpContext)
void Log(Exception exception, HttpContext context = null)
Logs an exception that occurred.
Parameters | |
---|---|
Name | Description |
exception | Exception The exception to log. Must not be null. |
context | HttpContext Optional, the current HTTP context. If unset the current context will be retrieved automatically. |
LogAsync(Exception, HttpContext, CancellationToken)
Task LogAsync(Exception exception, HttpContext context = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously logs an exception that occurred.
Parameters | |
---|---|
Name | Description |
exception | Exception The exception to log. Must not be null. |
context | HttpContext Optional, the current HTTP context. If unset the current context will be retrieved automatically. |
cancellationToken | CancellationToken Optional, The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous operation. |