rollingwriter icon indicating copy to clipboard operation
rollingwriter copied to clipboard

归档后,还是会往归档文件中持续写入日志

Open xwj-vic opened this issue 2 years ago • 6 comments

归档后,还是会往归档文件中持续写入日志

xwj-vic avatar Aug 31 '22 06:08 xwj-vic

归档后,还是会往归档文件中持续写入日志

could you please add more information about this issue

arthurkiller avatar Aug 31 '22 06:08 arthurkiller

更新了最新的tag:1.1.3,日志配置整点切割归档,但是新产生的日志还会往最新的归档文件里写

xwj-vic avatar Aug 31 '22 07:08 xwj-vic

https://github.com/arthurkiller/rollingwriter/issues/27,参考了这个issue,但测试后还是会往往最新的归档文件里写日志

xwj-vic avatar Aug 31 '22 07:08 xwj-vic

image

并发分片时,rename方法会失败,从而导致日志会打到错误的归档文件中

@arthurkiller

xwj-vic avatar Sep 06 '22 07:09 xwj-vic

你的意思是多个进程写同一个日志文件是么?还是说多个 goroutine?

arthurkiller avatar Sep 06 '22 12:09 arthurkiller

或者可以提供一个可以复现的代码片段也行,我试下

arthurkiller avatar Sep 06 '22 12:09 arthurkiller