public interface IExceptionLoggerA generic exception logger.
Namespace
Google.Cloud.Diagnostics.AspNetCoreAssembly
Google.Cloud.Diagnostics.AspNetCore.dll
Methods
Log(Exception, HttpContext)
void Log(Exception exception, HttpContext context = null)Logs an exception that occurred.
| Parameters | |
|---|---|
| Name | Description | 
exception | 
        ExceptionThe exception to log. Must not be null.  | 
      
context | 
        HttpContextOptional, 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 | 
        ExceptionThe exception to log. Must not be null.  | 
      
context | 
        HttpContextOptional, the current HTTP context. If unset the current context will be retrieved automatically.  | 
      
cancellationToken | 
        CancellationTokenOptional, The token to monitor for cancellation requests.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Task | 
        A task representing the asynchronous operation.  |