Open ssgnh opened 3 months ago
多个分类日志存储再同一个日志记录文件里,限制单个文件的大小和总日志文件的数量
zlog配置如下:
# # 单个日志最大5M,最多存10个 modbus_tcp.INFO "./logs/bau-%d(%F).log" , 5MB * 10 ~ "./logs/bau-old-%d(%Y%m%d).#2s.log"; detail main.INFO "./logs/bau-%d(%F).log"; detail data_storage.INFO "./logs/bau-%d(%F).log"; detail config.DEBUG "./logs/bau-%d(%F).log"; detail gpio.DEBUG "./logs/bau-%d(%F).log"; detail sqlite3.INFO "./logs/bau-%d(%F).log"; detail rs_485_screen.INFO "./logs/bau-%d(%F).log"; detail watch_dog.DEBUG "./logs/bau-%d(%F).log"; detail pcs_tcp.DEBUG "./logs/bau-%d(%F).log"; detail env_dev.INFO "./logs/bau-%d(%F).log"; detail can.INFO "./logs/bau-%d(%F).log"; detail # # *.* "aa.log", 100MB ~ "aa-%d(%Y%m%d).#2s.log"
5MB * 10 ~ "./logs/bau-old-%d(%Y%m%d).#2s.log"
期待您的回复!
目的
多个分类日志存储再同一个日志记录文件里,限制单个文件的大小和总日志文件的数量
问题
zlog配置如下:
5MB * 10 ~ "./logs/bau-old-%d(%Y%m%d).#2s.log"
,是每个分类都要写上吗?期待您的回复!