Class SoLogger
Summary description for SoLogger.
Inherited Members
Namespace: SuperOffice.Diagnostics
Assembly: SoCore.dll
Syntax
public sealed class SoLogger
Constructors
SoLogger(ILoggerFactory)
Summary description for SoLogger.
Declaration
public SoLogger(ILoggerFactory loggerFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| ILoggerFactory | loggerFactory |
Properties
Logger
Summary description for SoLogger.
Declaration
public static SoLogger Logger { get; }
Property Value
| Type | Description |
|---|---|
| SoLogger |
Methods
BeginScope(string, string, params object[])
Open a logging scope
Declaration
public static IDisposable BeginScope(string category, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | category | |
| string | message | Summary message |
| object[] | args | Details for message |
Returns
| Type | Description |
|---|---|
| IDisposable | Disposable scope. Dispose to close scope. |
BeginScope<T>(string, params object[])
Open a logging scope
Declaration
public static IDisposable BeginScope<T>(string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Summary message |
| object[] | args | Details for message |
Returns
| Type | Description |
|---|---|
| IDisposable | Disposable scope. Dispose to close scope. |
Type Parameters
| Name | Description |
|---|---|
| T |
GetLogger(string)
Summary description for SoLogger.
Declaration
public ILogger GetLogger(string categoryName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | categoryName |
Returns
| Type | Description |
|---|---|
| ILogger |
GetLogger<T>()
Summary description for SoLogger.
Declaration
public ILogger<T> GetLogger<T>()
Returns
| Type | Description |
|---|---|
| ILogger<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
LogCritical<T>(Exception, string, params object[])
Create and log an event of type Critical to the logging system.
Declaration
public static void LogCritical<T>(Exception exception, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | exception | Exception being thrown |
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
Type Parameters
| Name | Description |
|---|---|
| T |
LogCritical<T>(string, params object[])
Create and log an event of type Critical to the logging system.
Declaration
public static void LogCritical<T>(string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
Type Parameters
| Name | Description |
|---|---|
| T |
LogDebug(string, string, params object[])
Create and log an event of type Debug to the logging system.
Declaration
public static void LogDebug(string categoryName, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | categoryName | Log category - usually the type name |
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
LogDebug<T>(Exception, string, params object[])
Create and log an event of type Debug to the logging system.
Declaration
public static void LogDebug<T>(Exception exception, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | exception | Exception being thrown |
| string | message | Summary message |
| object[] | args | Details for message |
Type Parameters
| Name | Description |
|---|---|
| T |
LogDebug<T>(string, params object[])
Create and log an event of type Debug to the logging system.
Declaration
public static void LogDebug<T>(string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Summary message |
| object[] | args | Parameters to message |
Type Parameters
| Name | Description |
|---|---|
| T |
LogError(string, string, params object[])
Create and log an event of type Error to the logging system.
Declaration
public static void LogError(string categoryName, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | categoryName | Log category - usually the type name |
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
LogError<T>(Exception, string, params object[])
Create and log an event of type Error to the logging system.
Declaration
public static void LogError<T>(Exception exception, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | exception | Exception being thrown |
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
Type Parameters
| Name | Description |
|---|---|
| T |
LogError<T>(string, params object[])
Create and log an event of type Error to the logging system.
Declaration
public static void LogError<T>(string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
Type Parameters
| Name | Description |
|---|---|
| T |
LogExceptionError(string, Exception, string, params object[])
Create and log an event of type Error to the logging system.
Declaration
public static void LogExceptionError(string categoryName, Exception exception, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | categoryName | Log category - usually the type name |
| Exception | exception | |
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
LogExceptionError<T>(Exception, string, params object[])
Summary description for SoLogger.
Declaration
public static void LogExceptionError<T>(Exception exception, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | exception | |
| string | message | |
| object[] | args |
Type Parameters
| Name | Description |
|---|---|
| T |
LogExceptionWarning(string, Exception, string, params object[])
Create and log an event of type Warning to the logging system.
Declaration
public static void LogExceptionWarning(string categoryName, Exception exception, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | categoryName | Log category - usually the type name |
| Exception | exception | |
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
LogFailure(Exception, string, params object[])
Create and log an event of type Error to the logging system, tagged as FailureAudit.
Declaration
public static void LogFailure(Exception exception, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | exception | Exception being thrown |
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
LogInformation(string, string, params object[])
Create and log an event of type Information to the logging system.
Declaration
public static void LogInformation(string categoryName, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | categoryName | Log category - usually the type name |
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
LogInformation<T>(Exception, string, params object[])
Create and log an event of type Information to the logging system.
Declaration
public static void LogInformation<T>(Exception exception, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | exception | Exception being thrown |
| string | message | Summary message |
| object[] | args | Details for message |
Type Parameters
| Name | Description |
|---|---|
| T |
LogInformation<T>(string, params object[])
Create and log an event of type Information to the logging system.
Declaration
public static void LogInformation<T>(string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
Type Parameters
| Name | Description |
|---|---|
| T |
LogSuccess(Exception, string, params object[])
Create and log an event of type Information to the logging system, tagged as SuccessAudit.
Declaration
public static void LogSuccess(Exception exception, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | exception | Exception being thrown |
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
LogTrace(string, string, params object[])
Create and log an event of type Trace to the logging system.
Declaration
public static void LogTrace(string categoryName, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | categoryName | Log category - usually the type name |
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
LogTrace<T>(string, params object[])
Create and log an event of type Trace to the logging system.
Declaration
public static void LogTrace<T>(string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args |
Type Parameters
| Name | Description |
|---|---|
| T |
LogWarning(string, string, params object[])
Create and log an event of type Warning to the logging system.
Declaration
public static void LogWarning(string categoryName, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | categoryName | Log category - usually the type name |
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
LogWarning<T>(Exception, string, params object[])
Create and log an event of type Warning to the logging system.
Declaration
public static void LogWarning<T>(Exception exception, string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | exception | Exception being thrown |
| string | message | Summary message |
| object[] | args | Details for message |
Type Parameters
| Name | Description |
|---|---|
| T |
LogWarning<T>(string, params object[])
Create and log an event of type Warning to the logging system.
Declaration
public static void LogWarning<T>(string message, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Log message, including {placeholders} for arguments. |
| object[] | args | Parameters to message |
Type Parameters
| Name | Description |
|---|---|
| T |