C# Класс Common.Logging.Factory.AbstractLogger

Наследование: ILog
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Debug ( IFormatProvider formatProvider, System.Action formatMessageCallback ) : void

Log a message with the LogLevel.Debug level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Debug ( IFormatProvider formatProvider, System.Action formatMessageCallback, Exception exception ) : void

Log a message with the LogLevel.Debug level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Debug ( System.Action formatMessageCallback ) : void

Log a message with the LogLevel.Debug level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Debug ( System.Action formatMessageCallback, Exception exception ) : void

Log a message with the LogLevel.Debug level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Debug ( object message ) : void

Log a message object with the LogLevel.Debug level.

Debug ( object message, Exception exception ) : void

Log a message object with the LogLevel.Debug level including the stack Debug of the Exception passed as a parameter.

Error ( IFormatProvider formatProvider, System.Action formatMessageCallback ) : void

Log a message with the LogLevel.Error level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Error ( IFormatProvider formatProvider, System.Action formatMessageCallback, Exception exception ) : void

Log a message with the LogLevel.Error level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Error ( System.Action formatMessageCallback ) : void

Log a message with the LogLevel.Error level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Error ( System.Action formatMessageCallback, Exception exception ) : void

Log a message with the LogLevel.Error level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Error ( object message ) : void

Log a message object with the LogLevel.Error level.

Error ( object message, Exception exception ) : void

Log a message object with the LogLevel.Error level including the stack Error of the Exception passed as a parameter.

Fatal ( IFormatProvider formatProvider, System.Action formatMessageCallback ) : void

Log a message with the LogLevel.Fatal level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Fatal ( IFormatProvider formatProvider, System.Action formatMessageCallback, Exception exception ) : void

Log a message with the LogLevel.Fatal level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Fatal ( System.Action formatMessageCallback ) : void

Log a message with the LogLevel.Fatal level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Fatal ( System.Action formatMessageCallback, Exception exception ) : void

Log a message with the LogLevel.Fatal level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Fatal ( object message ) : void

Log a message object with the LogLevel.Fatal level.

Fatal ( object message, Exception exception ) : void

Log a message object with the LogLevel.Fatal level including the stack Fatal of the Exception passed as a parameter.

Info ( IFormatProvider formatProvider, System.Action formatMessageCallback ) : void

Log a message with the LogLevel.Info level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Info ( IFormatProvider formatProvider, System.Action formatMessageCallback, Exception exception ) : void

Log a message with the LogLevel.Info level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Info ( System.Action formatMessageCallback ) : void

Log a message with the LogLevel.Info level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Info ( System.Action formatMessageCallback, Exception exception ) : void

Log a message with the LogLevel.Info level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Info ( object message ) : void

Log a message object with the LogLevel.Info level.

Info ( object message, Exception exception ) : void

Log a message object with the LogLevel.Info level including the stack Info of the Exception passed as a parameter.

Trace ( IFormatProvider formatProvider, System.Action formatMessageCallback ) : void

Log a message with the LogLevel.Trace level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Trace ( IFormatProvider formatProvider, System.Action formatMessageCallback, Exception exception ) : void

Log a message with the LogLevel.Trace level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Trace ( System.Action formatMessageCallback ) : void

Log a message with the LogLevel.Trace level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Trace ( System.Action formatMessageCallback, Exception exception ) : void

Log a message with the LogLevel.Trace level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Trace ( object message ) : void

Log a message object with the LogLevel.Trace level.

Trace ( object message, Exception exception ) : void

Log a message object with the LogLevel.Trace level including the stack trace of the Exception passed as a parameter.

Warn ( IFormatProvider formatProvider, System.Action formatMessageCallback ) : void

Log a message with the LogLevel.Warn level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Warn ( IFormatProvider formatProvider, System.Action formatMessageCallback, Exception exception ) : void

Log a message with the LogLevel.Warn level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Warn ( System.Action formatMessageCallback ) : void

Log a message with the LogLevel.Warn level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Warn ( System.Action formatMessageCallback, Exception exception ) : void

Log a message with the LogLevel.Warn level using a callback to obtain the message

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

Warn ( object message ) : void

Log a message object with the LogLevel.Warn level.

Warn ( object message, Exception exception ) : void

Log a message object with the LogLevel.Warn level including the stack Warn of the Exception passed as a parameter.

Защищенные методы

Метод Описание
AbstractLogger ( ) : System

Creates a new logger instance using WriteInternal for writing log events to the underlying log system.

GetWriteHandler ( ) : WriteHandler

Override this method to use a different method than WriteInternal for writing log events to the underlying log system.

Usually you don't need to override thise method. The default implementation returns null to indicate that the default handler WriteInternal should be used.

WriteInternal ( LogLevel level, object message, Exception exception ) : void

Actually sends the message to the underlying log system.

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

Метод Описание
DebugFormat ( IFormatProvider formatProvider, string format ) : void
DebugFormat ( IFormatProvider formatProvider, string format, Exception exception ) : void
DebugFormat ( string format ) : void
DebugFormat ( string format, Exception exception ) : void
ErrorFormat ( IFormatProvider formatProvider, string format ) : void
ErrorFormat ( IFormatProvider formatProvider, string format, Exception exception ) : void
ErrorFormat ( string format ) : void
ErrorFormat ( string format, Exception exception ) : void
FatalFormat ( IFormatProvider formatProvider, string format ) : void
FatalFormat ( IFormatProvider formatProvider, string format, Exception exception ) : void
FatalFormat ( string format ) : void
FatalFormat ( string format, Exception exception ) : void
InfoFormat ( IFormatProvider formatProvider, string format ) : void
InfoFormat ( IFormatProvider formatProvider, string format, Exception exception ) : void
InfoFormat ( string format ) : void
InfoFormat ( string format, Exception exception ) : void
TraceFormat ( IFormatProvider formatProvider, string format ) : void
TraceFormat ( IFormatProvider formatProvider, string format, Exception exception ) : void
TraceFormat ( string format ) : void
TraceFormat ( string format, Exception exception ) : void
WarnFormat ( IFormatProvider formatProvider, string format ) : void
WarnFormat ( IFormatProvider formatProvider, string format, Exception exception ) : void
WarnFormat ( string format ) : void
WarnFormat ( string format, Exception exception ) : void

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

AbstractLogger() защищенный Метод

Creates a new logger instance using WriteInternal for writing log events to the underlying log system.
protected AbstractLogger ( ) : System
Результат System

Debug() публичный Метод

Log a message with the LogLevel.Debug level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Debug ( IFormatProvider formatProvider, System.Action formatMessageCallback ) : void
formatProvider IFormatProvider An that supplies culture-specific formatting information.
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
Результат void

Debug() публичный Метод

Log a message with the LogLevel.Debug level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Debug ( IFormatProvider formatProvider, System.Action formatMessageCallback, Exception exception ) : void
formatProvider IFormatProvider An that supplies culture-specific formatting information.
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
exception System.Exception The exception to log, including its stack Debug.
Результат void

Debug() публичный Метод

Log a message with the LogLevel.Debug level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Debug ( System.Action formatMessageCallback ) : void
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
Результат void

Debug() публичный Метод

Log a message with the LogLevel.Debug level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Debug ( System.Action formatMessageCallback, Exception exception ) : void
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
exception System.Exception The exception to log, including its stack Debug.
Результат void

Debug() публичный Метод

Log a message object with the LogLevel.Debug level.
public Debug ( object message ) : void
message object The message object to log.
Результат void

Debug() публичный Метод

Log a message object with the LogLevel.Debug level including the stack Debug of the Exception passed as a parameter.
public Debug ( object message, Exception exception ) : void
message object The message object to log.
exception System.Exception The exception to log, including its stack Debug.
Результат void

Error() публичный Метод

Log a message with the LogLevel.Error level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Error ( IFormatProvider formatProvider, System.Action formatMessageCallback ) : void
formatProvider IFormatProvider An that supplies culture-specific formatting information.
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
Результат void

Error() публичный Метод

Log a message with the LogLevel.Error level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Error ( IFormatProvider formatProvider, System.Action formatMessageCallback, Exception exception ) : void
formatProvider IFormatProvider An that supplies culture-specific formatting information.
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
exception System.Exception The exception to log, including its stack Error.
Результат void

Error() публичный Метод

Log a message with the LogLevel.Error level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Error ( System.Action formatMessageCallback ) : void
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
Результат void

Error() публичный Метод

Log a message with the LogLevel.Error level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Error ( System.Action formatMessageCallback, Exception exception ) : void
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
exception System.Exception The exception to log, including its stack Error.
Результат void

Error() публичный Метод

Log a message object with the LogLevel.Error level.
public Error ( object message ) : void
message object The message object to log.
Результат void

Error() публичный Метод

Log a message object with the LogLevel.Error level including the stack Error of the Exception passed as a parameter.
public Error ( object message, Exception exception ) : void
message object The message object to log.
exception System.Exception The exception to log, including its stack Error.
Результат void

Fatal() публичный Метод

Log a message with the LogLevel.Fatal level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Fatal ( IFormatProvider formatProvider, System.Action formatMessageCallback ) : void
formatProvider IFormatProvider An that supplies culture-specific formatting information.
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
Результат void

Fatal() публичный Метод

Log a message with the LogLevel.Fatal level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Fatal ( IFormatProvider formatProvider, System.Action formatMessageCallback, Exception exception ) : void
formatProvider IFormatProvider An that supplies culture-specific formatting information.
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
exception System.Exception The exception to log, including its stack Fatal.
Результат void

Fatal() публичный Метод

Log a message with the LogLevel.Fatal level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Fatal ( System.Action formatMessageCallback ) : void
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
Результат void

Fatal() публичный Метод

Log a message with the LogLevel.Fatal level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Fatal ( System.Action formatMessageCallback, Exception exception ) : void
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
exception System.Exception The exception to log, including its stack Fatal.
Результат void

Fatal() публичный Метод

Log a message object with the LogLevel.Fatal level.
public Fatal ( object message ) : void
message object The message object to log.
Результат void

Fatal() публичный Метод

Log a message object with the LogLevel.Fatal level including the stack Fatal of the Exception passed as a parameter.
public Fatal ( object message, Exception exception ) : void
message object The message object to log.
exception System.Exception The exception to log, including its stack Fatal.
Результат void

GetWriteHandler() защищенный Метод

Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
Usually you don't need to override thise method. The default implementation returns null to indicate that the default handler WriteInternal should be used.
protected GetWriteHandler ( ) : WriteHandler
Результат WriteHandler

Info() публичный Метод

Log a message with the LogLevel.Info level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Info ( IFormatProvider formatProvider, System.Action formatMessageCallback ) : void
formatProvider IFormatProvider An that supplies culture-specific formatting information.
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
Результат void

Info() публичный Метод

Log a message with the LogLevel.Info level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Info ( IFormatProvider formatProvider, System.Action formatMessageCallback, Exception exception ) : void
formatProvider IFormatProvider An that supplies culture-specific formatting information.
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
exception System.Exception The exception to log, including its stack Info.
Результат void

Info() публичный Метод

Log a message with the LogLevel.Info level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Info ( System.Action formatMessageCallback ) : void
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
Результат void

Info() публичный Метод

Log a message with the LogLevel.Info level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Info ( System.Action formatMessageCallback, Exception exception ) : void
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
exception System.Exception The exception to log, including its stack Info.
Результат void

Info() публичный Метод

Log a message object with the LogLevel.Info level.
public Info ( object message ) : void
message object The message object to log.
Результат void

Info() публичный Метод

Log a message object with the LogLevel.Info level including the stack Info of the Exception passed as a parameter.
public Info ( object message, Exception exception ) : void
message object The message object to log.
exception System.Exception The exception to log, including its stack Info.
Результат void

Trace() публичный Метод

Log a message with the LogLevel.Trace level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Trace ( IFormatProvider formatProvider, System.Action formatMessageCallback ) : void
formatProvider IFormatProvider An that supplies culture-specific formatting information.
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
Результат void

Trace() публичный Метод

Log a message with the LogLevel.Trace level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Trace ( IFormatProvider formatProvider, System.Action formatMessageCallback, Exception exception ) : void
formatProvider IFormatProvider An that supplies culture-specific formatting information.
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
exception System.Exception The exception to log, including its stack trace.
Результат void

Trace() публичный Метод

Log a message with the LogLevel.Trace level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Trace ( System.Action formatMessageCallback ) : void
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
Результат void

Trace() публичный Метод

Log a message with the LogLevel.Trace level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Trace ( System.Action formatMessageCallback, Exception exception ) : void
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
exception System.Exception The exception to log, including its stack trace.
Результат void

Trace() публичный Метод

Log a message object with the LogLevel.Trace level.
public Trace ( object message ) : void
message object The message object to log.
Результат void

Trace() публичный Метод

Log a message object with the LogLevel.Trace level including the stack trace of the Exception passed as a parameter.
public Trace ( object message, Exception exception ) : void
message object The message object to log.
exception System.Exception The exception to log, including its stack trace.
Результат void

Warn() публичный Метод

Log a message with the LogLevel.Warn level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Warn ( IFormatProvider formatProvider, System.Action formatMessageCallback ) : void
formatProvider IFormatProvider An that supplies culture-specific formatting information.
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
Результат void

Warn() публичный Метод

Log a message with the LogLevel.Warn level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Warn ( IFormatProvider formatProvider, System.Action formatMessageCallback, Exception exception ) : void
formatProvider IFormatProvider An that supplies culture-specific formatting information.
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
exception System.Exception The exception to log, including its stack Warn.
Результат void

Warn() публичный Метод

Log a message with the LogLevel.Warn level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Warn ( System.Action formatMessageCallback ) : void
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
Результат void

Warn() публичный Метод

Log a message with the LogLevel.Warn level using a callback to obtain the message
Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.
public Warn ( System.Action formatMessageCallback, Exception exception ) : void
formatMessageCallback System.Action A callback used by the logger to obtain the message if log level is matched
exception System.Exception The exception to log, including its stack Warn.
Результат void

Warn() публичный Метод

Log a message object with the LogLevel.Warn level.
public Warn ( object message ) : void
message object The message object to log.
Результат void

Warn() публичный Метод

Log a message object with the LogLevel.Warn level including the stack Warn of the Exception passed as a parameter.
public Warn ( object message, Exception exception ) : void
message object The message object to log.
exception System.Exception The exception to log, including its stack Warn.
Результат void

WriteInternal() защищенный абстрактный Метод

Actually sends the message to the underlying log system.
protected abstract WriteInternal ( LogLevel level, object message, Exception exception ) : void
level LogLevel the level of this log event.
message object the message to log
exception System.Exception the exception to log (may be null)
Результат void