Class ErrorLoggingFactory
Helper class for logging errors
Inheritance
System.Object
ErrorLoggingFactory
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: STAIExtensions.Abstractions.Common
Assembly: STAIExtensions.Abstractions.dll
Syntax
public static class ErrorLoggingFactory
Methods
LogError(TelemetryClient, ILogger, Exception, String, Object[])
Logs an error to the applicable channel with the telemetry client as the first priority and then on the Logger Channel if it is not null
Declaration
public static void LogError(TelemetryClient telemetryClient, ILogger logger, Exception ex, string message, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.ApplicationInsights.TelemetryClient | telemetryClient | The optional Application Insights Telemetry client |
Microsoft.Extensions.Logging.ILogger | logger | The optional ILogger |
Exception | ex | The exception to log |
System.String | message | The error message |
System.Object[] | args | The arguments to format the message with |