先贴上代码,参考网上资料的,忘记是谁的了,先谢谢他。
不过尝试看下Log4net的命名空间就会发现,太棒了,跟MyMetal一样,用起来非常方便。
修改文件路径的代码:
 System.IO.StreamWriter(rfa.File, rfa.AppendToFile, rfa.Encoding);
                    }
                }
            }
        }
修改配置文件的代码:
log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo(Server .MapPath ( "~/Config/log4net.config")));

相关文章:

  • 2021-09-12
  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
猜你喜欢
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2021-08-18
  • 2022-12-23
相关资源
相似解决方案