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

资源简介

log4net 记录wpf 错误日志

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using Common;

namespace WpfApplication1
{
    /// 
    /// App.xaml 的交互逻辑
    /// 

    public partial class App : Application
    {
        public App()
        {
            this.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(App_DispatcherUnhandledException);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
        }
        
        void CurrentDomain_UnhandledException(object sender UnhandledExceptionEventArgs e)
        {
            if (e.Exceptionobject is System.Exception)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-10-29 10:32  WpfApplication1\
     目录           0  2013-10-29 10:34  WpfApplication1\WpfApplication1\
     文件         887  2013-10-29 10:32  WpfApplication1\WpfApplication1.sln
     文件       15872  2013-10-29 10:34  WpfApplication1\WpfApplication1.suo
     文件         144  2013-10-29 10:34  WpfApplication1\WpfApplication1\app.config
     文件         326  2013-10-29 10:32  WpfApplication1\WpfApplication1\App.xaml
     文件        1310  2013-10-29 15:03  WpfApplication1\WpfApplication1\App.xaml.cs
     目录           0  2013-10-29 10:32  WpfApplication1\WpfApplication1\bin\
     目录           0  2013-10-29 10:38  WpfApplication1\WpfApplication1\bin\Debug\
     目录           0  2013-10-29 10:38  WpfApplication1\WpfApplication1\bin\Debug\Log\
     文件        1715  2013-10-29 10:32  WpfApplication1\WpfApplication1\bin\Debug\log4net.config
     文件      249856  2013-10-29 10:32  WpfApplication1\WpfApplication1\bin\Debug\log4net.dll
     文件     1287495  2013-10-29 10:32  WpfApplication1\WpfApplication1\bin\Debug\log4net.xml
     目录           0  2013-10-29 10:38  WpfApplication1\WpfApplication1\bin\Debug\Log\LogError\
     文件        7178  2013-10-29 15:03  WpfApplication1\WpfApplication1\bin\Debug\Log\LogError\20131029.htm
     目录           0  2013-10-29 10:38  WpfApplication1\WpfApplication1\bin\Debug\Log\LogInfo\
     文件           0  2013-10-29 10:38  WpfApplication1\WpfApplication1\bin\Debug\Log\LogInfo\20131029.htm
     文件     1298432  2013-10-29 15:03  WpfApplication1\WpfApplication1\bin\Debug\WpfApplication1.exe
     文件         144  2013-10-29 10:34  WpfApplication1\WpfApplication1\bin\Debug\WpfApplication1.exe.config
     文件       42496  2013-10-29 15:03  WpfApplication1\WpfApplication1\bin\Debug\WpfApplication1.pdb
     文件       11600  2013-10-29 15:03  WpfApplication1\WpfApplication1\bin\Debug\WpfApplication1.vshost.exe
     文件         144  2013-10-29 10:34  WpfApplication1\WpfApplication1\bin\Debug\WpfApplication1.vshost.exe.config
     文件         490  2010-03-17 22:39  WpfApplication1\WpfApplication1\bin\Debug\WpfApplication1.vshost.exe.manifest
     目录           0  2013-10-29 10:32  WpfApplication1\WpfApplication1\Libs\
     文件      249856  2013-10-29 10:32  WpfApplication1\WpfApplication1\Libs\log4net.dll
     文件     1287495  2013-10-29 10:32  WpfApplication1\WpfApplication1\Libs\log4net.xml
     文件        1715  2013-10-29 10:32  WpfApplication1\WpfApplication1\log4net.config
     文件        2063  2013-10-29 10:38  WpfApplication1\WpfApplication1\LogHelper.cs
     文件         465  2013-10-29 10:40  WpfApplication1\WpfApplication1\MainWindow.xaml
     文件         801  2013-10-29 10:34  WpfApplication1\WpfApplication1\MainWindow.xaml.cs
     目录           0  2013-10-29 10:32  WpfApplication1\WpfApplication1\obj\
............此处省略30个文件信息

评论

共有 条评论