20190422添加换行以及时间记录 using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DAL { public class TXTLogHelper { /// <summary> /// 对某些操作进行TXT日志记录 /// </summary>…
在C的世界里面没有特别好的日志函数库(就像JAVA里面的的log4j,或者C++的log4cxx).C程序员都喜欢用自己的轮子.printf就是个挺好的轮子,但没办法通过配置改变日志的格式或者输出文件.syslog是个系统级别的轮子,不过速度慢,而且功能比较单调 下载:https://github.com/HardySimpson/zlog/releases 安装 # make # sudo make install or # make PREFIX=./install install 使用 #…