C# Class Ivony.Logs.LoggerWrapperExtensions

定义 Logger 的各种包装辅助方法
Datei anzeigen Open project: Ivony/LogUtility

Public Methods

Method Description
IgnoreError ( this logger ) : Logger

创建一个新的日志记录器,忽略记录日志中出现的任何异常

WithFilter ( this logger, LogFilter filter ) : Logger

创建一个新的日志记录器,只记录符合条件的日志

WithSource ( this logger, LogSource source ) : Logger

创建一个日志记录器,对于所有的日志添加日志源信息

Method Details

IgnoreError() public static method

创建一个新的日志记录器,忽略记录日志中出现的任何异常
public static IgnoreError ( this logger ) : Logger
logger this 用于记录异常的日志记录器
return Logger

WithFilter() public static method

创建一个新的日志记录器,只记录符合条件的日志
public static WithFilter ( this logger, LogFilter filter ) : Logger
logger this 内部日志记录器,符合条件的日志将使用这个日志记录器记录
filter LogFilter 日志记录条件
return Logger

WithSource() public static method

创建一个日志记录器,对于所有的日志添加日志源信息
public static WithSource ( this logger, LogSource source ) : Logger
logger this 内部日志记录器,将使用这个日志记录器进行实际的日志记录
source LogSource 要添加的日志源信息
return Logger