惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
小众软件
小众软件
腾讯CDC
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Cloudflare Blog
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
Y
Y Combinator Blog
Engineering at Meta
Engineering at Meta
美团技术团队
U
Unit 42
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
WordPress大学
WordPress大学
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
罗磊的独立博客
aimingoo的专栏
aimingoo的专栏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
G
Google Developers Blog
C
Check Point Blog
大猫的无限游戏
大猫的无限游戏
Recent Announcements
Recent Announcements

博客园 - 落叶潇潇雨

Can't get WebApplicationContext object from ContextRegistry.GetContext(): Resource handler for the 'web' protocol is not defined xml序列化与反序列化 Asp.net 导出Excel How to debug Typescript in browser DataContractSerializer序列化与反序列化遇到的奇怪问题 图文安装Windows Template Library - WTL Version 9.0 WCF的传输安全(读书笔记) Asp.net mvc 各个组件的分离 同程旅游网开放平台SDK开发完成 csdn回到顶端 SQL多行变一列 Timer的schedule和scheduleAtFixedRate方法的区别解析 android 主线程和子线程之间的消息传递 activity生命周期 瀑布流插件 CSS自适应宽度圆角按钮 ajaxFileUpload上传文件和表单数据 Ajax上传表单数据和文件 使用Rhino Mocks
log4net使用的关键点
落叶潇潇雨 · 2014-10-14 · via 博客园 - 落叶潇潇雨

<configSections>

    < section name =" log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />

  </configSections>

  <log4net>

    < appender name =" UpdateManagementClientLogFileAppender" type="log4net.Appender.FileAppender" >

      < file type =" log4net.Util.PatternString" value="UpdateManagementClient.log" />

      < appendToFile value =" true" />

      < rollingStyle value =" Size" />

      < maximumFileSize value =" 10MB" />

      < maxSizeRollBackups value =" 10" />

      < layout type =" log4net.Layout.PatternLayout">

        < conversionPattern value =" %date [%thread] %-5level - %message%newline" />

      </ layout>

    </ appender>

    < root>

      < level value =" ALL" />

      < appender-ref ref =" UpdateManagementClientLogFileAppender" />

    </ root>

  </log4net>

AssemblyInfo.cs

[assembly: XmlConfigurator(Watch = true)]

private static readonly ILog Log = LogManager.GetLogger(MethodBase .GetCurrentMethod().DeclaringType);

Log.Info("test").