C# Класс Habanero.Base.Logging.Log4NetLogger

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

Защищенные свойства (Protected)

Свойство Тип Описание
_log log4net.ILog

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

Метод Описание
IsLogging ( LogCategory logCategory ) : bool

Checks the logger to see if it has been enabled to log messages of the specified LogCategory type.

Log ( Exception exception ) : void

Creates a single log entry for with the message with the appropriate message. The HabaneroLoggerLog4Net logs an entry with LogCategory.Exception unless the exception inherits from UserException in which case we log this with the LogCategory.Info

Log ( string message, Exception exception ) : void

Creates a single log entry for with the appropriate exception message and message. Although this is an interface and you can implement it as you wish for Log4NetLogger We log an entry with LogCategory.Exception unless the exception inherits from UserException in which case we log this with the LogCategory.Info

Log ( string message, Exception exception, LogCategory logCategory ) : void

Creates a single log entry for with appropriate exception message and message with the specified LogCategory.

Log ( string message, LogCategory logCategory ) : void

Logs the message to the configured loLog4Netgger with the appropriate LogCategory

Log4NetLogger ( Type contextType ) : System

Constructs the Logger with the appropriate contextType

Log4NetLogger ( string contextName ) : System

Constructs the Logger with the appropriate context

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

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

Checks the logger to see if it has been enabled to log messages of the specified LogCategory type.
public IsLogging ( LogCategory logCategory ) : bool
logCategory LogCategory The for which to check if logging is enabled or not.
Результат bool

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

Creates a single log entry for with the message with the appropriate message. The HabaneroLoggerLog4Net logs an entry with LogCategory.Exception unless the exception inherits from UserException in which case we log this with the LogCategory.Info
public Log ( Exception exception ) : void
exception System.Exception
Результат void

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

Creates a single log entry for with the appropriate exception message and message. Although this is an interface and you can implement it as you wish for Log4NetLogger We log an entry with LogCategory.Exception unless the exception inherits from UserException in which case we log this with the LogCategory.Info
public Log ( string message, Exception exception ) : void
message string The additional log message to be logged with the exception
exception System.Exception
Результат void

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

Creates a single log entry for with appropriate exception message and message with the specified LogCategory.
public Log ( string message, Exception exception, LogCategory logCategory ) : void
message string The additional log message to be logged with the exception
exception System.Exception The exception being logged
logCategory LogCategory The specified LogCategory
Результат void

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

Logs the message to the configured loLog4Netgger with the appropriate LogCategory
public Log ( string message, LogCategory logCategory ) : void
message string
logCategory LogCategory
Результат void

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

Constructs the Logger with the appropriate contextType
public Log4NetLogger ( Type contextType ) : System
contextType System.Type The Type of object this context is for.
Результат System

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

Constructs the Logger with the appropriate context
public Log4NetLogger ( string contextName ) : System
contextName string
Результат System

Описание свойств

_log защищенное свойство

The underlying log4net logger.
protected ILog,log4net _log
Результат log4net.ILog