Project Description
This is a logger library for .net, you can append text file, xml file, and colorful console text. It is suitable for small .net business projects and this logger library is designed by c#.

Features
http://logger.codeplex.com
  • Text file surpport
  • Conole surport (Colorful text, LogInfo is green, LogDebug is white, LogWarning is yellow, LogError is red.)
  • Xml file surpport


Configuration Files
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="Log" type="Zivsoft.Log.Handler,Zivsoft.Log"/>
  </configSections>
  <Log level="DEBUG">
    <LogFile>log.log</LogFile>
    <Console len="3">true</Console>
    <XmlLog enabled="true">log.xml</XmlLog>
    <ShowHeader>false</ShowHeader>
  </Log>
</configuration>

Sample code
using System;
using Zivsoft.Log;

namespace LogTest
{
    class Program
    {
        static void Main(string[] args)
        {
            Logger.LogDebug("debug"); //log for debug
            Logger.LogError("error"); //log for error
            Logger.LogInfo("Info"); //log for information
            Logger.LogWarning("Warning"); //log for warning 
            Console.Read(); //pause the console
        }
    }
}



Related Website

Last edited Jul 23, 2009 at 4:55 AM by lihuaz, version 16