生成特定大小的日志文件 [英] generate log file for certain size

查看:62
本文介绍了生成特定大小的日志文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨团队,



我很难生成日志文件,我的意思是当超过100 KB时会产生file.txt,文件(1) .txt,file(2).txt



i需要你的帮助来解决这些案例的解决方案

Hi team,

i've got the difficulty to generate log file, i mean when exceed 100 KB it will generate file.txt, file(1).txt, file(2).txt

i need your help for give solution from those case

推荐答案

为什么不使用像log4net这样的现有日志工具?您可以使用配置设置轻松配置最大日志文件大小。



参考: Log4Net中LogFileAppender的最大文件大小 [ ^ ]

使用C#对log4net日志库进行简要介绍[ ^ ]

log4net教程 [ ^ ]
why not using existing logging tool like log4net? you can easily configure the maximum log file size using connfiguration settings.

refer : Maximum Filesize of LogFileAppender in Log4Net[^]
A Brief Introduction to the log4net logging library, using C#[^]
log4net Tutorial[^]


这篇关于生成特定大小的日志文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆