问题描述
我正在为文件使用以下配置
const auditLogFile = config.log.location + '/audit.log';
const errorLogFile = config.log.location + '/error.log';
const logTypes = {
audit: {
stream: new RotatingFileStream({
path: auditLogFile,period: '1d',// daily rotation
totalFiles: 2,// keep up to 5 back copies
rotateExisting: true,// Give ourselves a clean file when we start up,based on period
threshold: '50k',// Rotate log files larger than 10 megabytes
totalSize: '100k',// Don't keep more than 20mb of archived log files
gzip: true,// Compress the archive log files to save space
}),level: bunyan.INFO,},error: {
stream: new RotatingFileStream({
path: errorLogFile,level: bunyan.ERROR,}
};
但是,文件大小将超过 50kb,并且不会旋转。我错过了什么吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)