public interface IContextExceptionLogger : IDisposable
A generic exception logger for IContextWrappers.
Namespace
Google.Cloud.Diagnostics.CommonAssembly
Google.Cloud.Diagnostics.Common.dll
Methods
Log(Exception, IContextWrapper)
void Log(Exception exception, IContextWrapper context)
Logs an exception that occurred.
Parameters | |
---|---|
Name | Description |
exception | Exception The exception to log. Must not be null. |
context | IContextWrapper The current context. Must not be null. |
LogAsync(Exception, IContextWrapper, CancellationToken)
Task LogAsync(Exception exception, IContextWrapper context, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously logs an exception that occurred.
Parameters | |
---|---|
Name | Description |
exception | Exception The exception to log. Must not be null. |
context | IContextWrapper The current context. Must not be null. |
cancellationToken | CancellationToken Optional, The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous operation. |