Log4Net試用

1 添加參考

2 新增Log4Net.config,放在Bin\Debug

3 Form1.vb添加ReadOnly logger As ILog = LogManager.GetLogger(GetType(Form1))

4 AssemblyInfo.vb添加<Assembly: log4net.Config.XmlConfigurator(ConfigFile:="Log4Net.config", Watch:=True)>

5 logger.Debug("divide err", ex)

posted @ 2010-08-10 16:52  yellowwood  阅读(149)  评论(0编辑  收藏  举报
Never Give UP