egg icon indicating copy to clipboard operation
egg copied to clipboard

egg-logratator 如何禁止默认的日志切割

Open NickNameWolf opened this issue 5 years ago • 3 comments

我通过扩展实现了自己想要的日志切割格式,但是egg-logrotator默认的按天切割还是会执行,如何禁止掉

NickNameWolf avatar Mar 16 '20 10:03 NickNameWolf

目前看来是不支持 https://github.com/eggjs/egg-logrotator/blob/master/app/lib/day_rotator.js#L65

你自己实现的切割诉求是怎么样的?切割时机有变化么?还是只是文件名格式问题?

atian25 avatar Mar 16 '20 13:03 atian25

目前看来是不支持 https://github.com/eggjs/egg-logrotator/blob/master/app/lib/day_rotator.js#L65

你自己实现的切割诉求是怎么样的?切割时机有变化么?还是只是文件名格式问题?

我需要切割时机还有文件名,包括切割之后文件放置路径都有变化,我尝试了自己定义了LogRotator 但是发现切割日志的时候默认的按天切割还是会执行.

NickNameWolf avatar Mar 17 '20 01:03 NickNameWolf

增加一个新配置 来关闭默认的切割 就好了

nightink avatar Apr 22 '20 03:04 nightink