C# Class Tup.Utilities.LogHelper

日志处理 助手 Log4net测试-Log4net使用封装类
http://zhq.ahau.edu.cn/blog/article.asp?id=366
Exibir arquivo Open project: tupunco/Tup.Utilities Class Usage Examples

Public Methods

Method Description
Assert ( bool condition, string message ) : void

断言

Assert ( bool condition, string message, Type type ) : void

断言

Error ( string msg ) : void

Error Log

Fatal ( string msg ) : void

Fatal Log

Info ( string msg ) : void

Info Log

Init ( ) : void

初始化日志系统 在系统运行开始初始化 Global.asax Application_Start内

Write ( string message, LogMessageType messageType ) : void

写入日志

Write ( string message, LogMessageType messageType, Exception ex ) : void

写入日志

Write ( string message, LogMessageType messageType, Exception ex, Type type ) : void

写入日志

Write ( string message, LogMessageType messageType, Type type ) : void

写入日志

Private Methods

Method Description
Debug ( string msg ) : void
DoLog ( string message, LogMessageType messageType, Exception ex, Type type ) : void

保存日志

Method Details

Assert() public static method

断言
public static Assert ( bool condition, string message ) : void
condition bool 条件
message string 日志信息
return void

Assert() public static method

断言
public static Assert ( bool condition, string message, Type type ) : void
condition bool 条件
message string 日志信息
type System.Type 日志类型
return void

Error() public static method

Error Log
public static Error ( string msg ) : void
msg string
return void

Fatal() public static method

Fatal Log
public static Fatal ( string msg ) : void
msg string
return void

Info() public static method

Info Log
public static Info ( string msg ) : void
msg string
return void

Init() public static method

初始化日志系统 在系统运行开始初始化 Global.asax Application_Start内
public static Init ( ) : void
return void

Write() public static method

写入日志
public static Write ( string message, LogMessageType messageType ) : void
message string 日志信息
messageType LogMessageType 日志类型
return void

Write() public static method

写入日志
public static Write ( string message, LogMessageType messageType, Exception ex ) : void
message string 日志信息
messageType LogMessageType 日志类型
ex System.Exception 异常
return void

Write() public static method

写入日志
public static Write ( string message, LogMessageType messageType, Exception ex, Type type ) : void
message string 日志信息
messageType LogMessageType 日志类型
ex System.Exception 异常
type System.Type
return void

Write() public static method

写入日志
public static Write ( string message, LogMessageType messageType, Type type ) : void
message string 日志信息
messageType LogMessageType 日志类型
type System.Type
return void