2014 相信自己能做的更好

---------------------------------------------------------------------------------------------------------
Everything is possible    Nothing is Impossible     
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

通用的日志处理类(分享)

Posted on 2007-03-13 16:32  Arping.Net探索  阅读(562)  评论(0编辑  收藏  举报
多的不说,有用的着的看看代码吧:
//=========================================
//Anthor : Andy Luo
//Function Description: 日志处理
//CopyRight By arping.cnblogs.net 200703
//=========================================
using System;
using System.Text;
using System.IO;
using System.Diagnostics;

namespace Logger
{
    
enum

    
public class Logger
    
{
        
private Logger()
        
{
            
//
            
// TODO: 在此处添加构造函数逻辑
            
//
        }


        
        
protected const string SysFileDir = @"C:\Temp";
        
protected const string SysFileName = "Tools.log";
        
protected const string DefaultLogFileName = @"c:\temp\AndyLuoLogger.log";
        
protected const string ConfigPath = "LogPath";
        
protected const string ConfigName = "LogName";
        

        
Property    

        
Public NewLog

        
AddLog()

        
GetLogFile 

        
Write2File()

        
Write2EventLog()



    }

}