public interface IContextExceptionLogger : IDisposableReference documentation and code samples for the Google.Cloud.Diagnostics.Common interface IContextExceptionLogger.
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 | ExceptionThe exception to log. Must not be null. | 
| context | IContextWrapperThe current context. Must not be null. | 
LogAsync(Exception, IContextWrapper, CancellationToken)
Task LogAsync(Exception exception, IContextWrapper context, CancellationToken cancellationToken = default)Asynchronously logs an exception that occurred.
| Parameters | |
|---|---|
| Name | Description | 
| exception | ExceptionThe exception to log. Must not be null. | 
| context | IContextWrapperThe current context. Must not be null. | 
| cancellationToken | CancellationTokenOptional, The token to monitor for cancellation requests. | 
| Returns | |
|---|---|
| Type | Description | 
| Task | A task representing the asynchronous operation. |