• 大小: 0.58M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: winform  log4net  

资源简介

在 web网站、winform、控制台使用log4net实例源码下载

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using log4net.Core;

namespace ConsoleLogDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            logTest();
            logFileTest();
        }

        private static void logTest()
        {
            log4net.ILog log = log4net.LogManager.GetLogger(“ConsoleApp.LoggingExample“);

            log.Info(“hello world!“);
        }

        private static void logFileTest()
        {
            log4net.ILog log = log4net.LogManager.GetLogger(“LoggingExample“);

            log.Info(“hello world!“);
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       7844  2008-11-27 22:36  Log4netDemo\ConsoleLogDemo\App.config

     文件       7844  2008-11-27 22:36  Log4netDemo\ConsoleLogDemo\bin\Debug\App.config

     文件      16384  2008-11-27 23:16  Log4netDemo\ConsoleLogDemo\bin\Debug\ConsoleLogDemo.exe

     文件       7844  2008-11-27 22:36  Log4netDemo\ConsoleLogDemo\bin\Debug\ConsoleLogDemo.exe.config

     文件      11776  2008-11-27 23:16  Log4netDemo\ConsoleLogDemo\bin\Debug\ConsoleLogDemo.pdb

     文件       5632  2005-11-11 22:25  Log4netDemo\ConsoleLogDemo\bin\Debug\ConsoleLogDemo.vshost.exe

     文件       7844  2008-11-27 22:36  Log4netDemo\ConsoleLogDemo\bin\Debug\ConsoleLogDemo.vshost.exe.config

     文件         75  2008-11-27 21:36  Log4netDemo\ConsoleLogDemo\bin\Debug\log\log-file.txt

     文件         86  2008-11-27 21:36  Log4netDemo\ConsoleLogDemo\bin\Debug\log\log20081127 .txt

     文件         86  2008-11-27 21:34  Log4netDemo\ConsoleLogDemo\bin\Debug\log\log20081127 .txt.1

     文件     270336  2007-10-03 21:26  Log4netDemo\ConsoleLogDemo\bin\Debug\log4net.dll

     文件       2408  2008-11-27 18:31  Log4netDemo\ConsoleLogDemo\ConsoleLogDemo.csproj

     文件     270336  2007-10-03 21:26  Log4netDemo\ConsoleLogDemo\dll\log4net.dll

     文件       8556  2008-11-27 21:27  Log4netDemo\ConsoleLogDemo\log4net.config

     文件       1368  2008-11-27 23:16  Log4netDemo\ConsoleLogDemo\obj\ConsoleLogDemo.csproj.FileListAbsolute.txt

     文件      16384  2008-11-27 23:16  Log4netDemo\ConsoleLogDemo\obj\Debug\ConsoleLogDemo.exe

     文件      11776  2008-11-27 23:16  Log4netDemo\ConsoleLogDemo\obj\Debug\ConsoleLogDemo.pdb

     文件        659  2008-11-27 21:40  Log4netDemo\ConsoleLogDemo\Program.cs

     文件       1277  2008-11-27 20:36  Log4netDemo\ConsoleLogDemo\Properties\AssemblyInfo.cs

     文件       4369  2008-11-27 23:17  Log4netDemo\Log4netDemo.sln

    ..A..H.     17408  2008-11-27 23:17  Log4netDemo\Log4netDemo.suo

     文件       1457  2008-11-15 14:45  Log4netDemo\LogDemo\Bin\log4net.config

     文件     270336  2007-10-03 21:26  Log4netDemo\LogDemo\Bin\log4net.dll

     文件         32  2008-11-15 14:46  Log4netDemo\LogDemo\Bin\log4net.dll.refresh

     文件     155648  2008-11-27 21:38  Log4netDemo\LogDemo\db\access.mdb

     文件        651  2008-11-15 14:59  Log4netDemo\LogDemo\Default.aspx

     文件        755  2008-11-17 17:55  Log4netDemo\LogDemo\Default.aspx.cs

     文件     270336  2007-10-03 21:26  Log4netDemo\LogDemo\dll\log4net.dll

     文件       1012  2008-11-15 14:54  Log4netDemo\LogDemo\Global.asax

     文件        134  2008-11-27 18:29  Log4netDemo\LogDemo\log\log-file.txt

............此处省略87个文件信息

评论

共有 条评论