C# Класс Aqueduct.Diagnostics.AppLogger

Logs errors and messages using specified configuration. Cannot be inherited.
Показать файл Открыть проект

Открытые методы

Метод Описание
AddGlobalCustomParameter ( string name, string value ) : void
GetNamedLogger ( Type loggedType ) : ILogger

Returns a new instance of ILogger with a name taken from a type

Need to have called Initialise before you can get a working logger

GetNamedLogger ( string logName ) : ILogger

Returns a new instance of ILogger with a given name

Need to have called Initialise before you can get a working logger

Initialise ( string configFilePath, string loggerName ) : void

Initialises AppLogger using the specified config file.

InitialiseFromConfig ( string loggerName ) : void

Initialises AppLogger using the Aqueduct.Config file.

Uses the contents of the Diagnostics.Config setting to Initialise the loggerTo enable the intrelnal log debugging set Diagnostics.InternalDebugMode setting to true

LogDebugMessage ( string message ) : void

Writes DEBUG-level message to the configured log.

LogError ( string message, Exception exception ) : void

Writes ERROR-level message to the configured log.

LogFatalError ( string message, Exception exception ) : void

Writes FATAL-level message to the configured log.

LogInfoMessage ( string message ) : void

Writes INFO-level message to the configured log.

LogWarningMessage ( string message ) : void

Writes WARNING-level message to the configured log.

Приватные методы

Метод Описание
SendToAppFail ( Exception exception ) : void

Описание методов

AddGlobalCustomParameter() публичный статический Метод

public static AddGlobalCustomParameter ( string name, string value ) : void
name string
value string
Результат void

GetNamedLogger() публичный статический Метод

Returns a new instance of ILogger with a name taken from a type
Need to have called Initialise before you can get a working logger
public static GetNamedLogger ( Type loggedType ) : ILogger
loggedType System.Type The type which will be used as the logger's name.
Результат ILogger

GetNamedLogger() публичный статический Метод

Returns a new instance of ILogger with a given name
Need to have called Initialise before you can get a working logger
public static GetNamedLogger ( string logName ) : ILogger
logName string Name of the logger to use for logging.
Результат ILogger

Initialise() публичный статический Метод

Initialises AppLogger using the specified config file.
when is null or empty. when is null or empty.
public static Initialise ( string configFilePath, string loggerName ) : void
configFilePath string Name of the config file to load configuration from.
loggerName string Name of the logger to use for logging.
Результат void

InitialiseFromConfig() публичный статический Метод

Initialises AppLogger using the Aqueduct.Config file.
Uses the contents of the Diagnostics.Config setting to Initialise the logger To enable the intrelnal log debugging set Diagnostics.InternalDebugMode setting to true
public static InitialiseFromConfig ( string loggerName ) : void
loggerName string
Результат void

LogDebugMessage() публичный статический Метод

Writes DEBUG-level message to the configured log.
public static LogDebugMessage ( string message ) : void
message string The message to log.
Результат void

LogError() публичный статический Метод

Writes ERROR-level message to the configured log.
public static LogError ( string message, Exception exception ) : void
message string The message to log.
exception System.Exception The exception to log.
Результат void

LogFatalError() публичный статический Метод

Writes FATAL-level message to the configured log.
public static LogFatalError ( string message, Exception exception ) : void
message string The message to log.
exception System.Exception The exception to log.
Результат void

LogInfoMessage() публичный статический Метод

Writes INFO-level message to the configured log.
public static LogInfoMessage ( string message ) : void
message string The message to log.
Результат void

LogWarningMessage() публичный статический Метод

Writes WARNING-level message to the configured log.
public static LogWarningMessage ( string message ) : void
message string The message to log.
Результат void