• log.net的应用示例(日志)


    log.net的应用很多朋友很清楚, 为了使不会用的朋友快速了解,这里我也搜了一些朋友的贴子http://blog.hnce.net/post/246.html后做如下示例,希望能对大家有所帮助:
    示例如下:

    log4net的配置文件link

    Log4Net.config

          FileInfo file = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "Log4Net.config");
          log4net.Config.XmlConfigurator.ConfigureAndWatch(file);

          static log4net.ILog logger = log4net.LogManager.GetLogger(typeof(ObjectXXX));
          logger.Info("xxxxxx");

    声明:本系列帖子都非原创, 乃是从网友的帖中淘出做了一些示例的, 具体的内容还请网上搜之.
  • 相关阅读:
    struts2重点——ValueStack和OGNL
    struts2基础——请求与响应、获取web资源
    struts2基础——最简单的一个例子
    servlet、filter、listener、interceptor之间的区别和联系
    服务器端组件
    自定义JSTL标签和函数库
    常见前端效果实现
    HTTP Cookie/Session
    获取动态SQL查询语句返回值(sp_executesql)
    WPF数据绑定
  • 原文地址:https://www.cnblogs.com/bigmouthz/p/1191570.html
Copyright © 2020-2023  润新知