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)