随笔分类 - C#--日志记录
摘要:1,主窗体:中添加日志的委托 private void FrmMain_Load(object sender, EventArgs e) { //打开默认的窗体:实时监控窗体 CommonNaviButton_ClickEvent(this.btn_monitor,null); //板卡初始化 Ad
阅读全文
摘要:1,引用NLog.dll 2,添加配置文件NLog.config 【2.1】配置文件 <?xml version="1.0" encoding="utf-8" ?> <!--<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmln
阅读全文
摘要:方法一(使用起来更简单) 1,LogHelper帮助类 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using
阅读全文