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

资源简介

log4net 全局错误

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Common;

namespace testLog4N
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender EventArgs e)
        {
            LogHelper.WriteLog(string.Format(“当前的时间{0}“ DateTime.Now.ToString()));
        }

        private void button2_Click(object sender EventArgs e)
        {
            throw new ArgumentNullException(“这是故意产生的异常“);
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-10-28 11:12  testLog4N\
     目录           0  2013-10-28 11:17  testLog4N\testLog4N\
     文件         869  2013-10-26 15:06  testLog4N\testLog4N.sln
     文件       15360  2013-10-28 19:32  testLog4N\testLog4N.suo
     文件         161  2013-10-28 11:22  testLog4N\testLog4N\App.config
     目录           0  2013-10-28 09:45  testLog4N\testLog4N\bin\
     目录           0  2013-10-28 11:20  testLog4N\testLog4N\bin\Debug\
     目录           0  2013-10-28 15:05  testLog4N\testLog4N\bin\Debug\Log\
     文件         368  2013-10-28 10:30  testLog4N\testLog4N\bin\Debug\log.txt
     文件        1908  2013-10-28 19:32  testLog4N\testLog4N\bin\Debug\log4net.config
     文件      249856  2013-10-26 15:06  testLog4N\testLog4N\bin\Debug\log4net.dll
     文件     1287495  2013-10-26 15:06  testLog4N\testLog4N\bin\Debug\log4net.xml
     目录           0  2013-10-28 20:00  testLog4N\testLog4N\bin\Debug\Log\LogError\
     文件        5652  2013-10-28 20:05  testLog4N\testLog4N\bin\Debug\Log\LogError\20131028.htm
     目录           0  2013-10-28 20:05  testLog4N\testLog4N\bin\Debug\Log\LogInfo\
     文件           0  2013-10-28 20:05  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm
     文件           0  2013-10-28 20:04  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.1
     文件           0  2013-10-28 19:28  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.10
     文件           0  2013-10-28 19:22  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.11
     文件           0  2013-10-28 19:21  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.12
     文件           0  2013-10-28 19:15  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.13
     文件           0  2013-10-28 19:13  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.14
     文件           0  2013-10-28 19:11  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.15
     文件           0  2013-10-28 19:10  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.16
     文件           0  2013-10-28 17:36  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.17
     文件           0  2013-10-28 17:26  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.18
     文件           0  2013-10-28 17:17  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.19
     文件           0  2013-10-28 20:02  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.2
     文件         167  2013-10-28 15:35  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.20
     文件       10020  2013-10-28 15:07  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.21
     文件           0  2013-10-28 20:00  testLog4N\testLog4N\bin\Debug\Log\LogInfo\20131028.htm.3
............此处省略41个文件信息

评论

共有 条评论