Log4j DailyRollingFileAppender 多进程并发
我有许多相同的进程正在使用 Log4j DailyRollingFileAppender
写入单个日志文件。我担心多个进程可能会尝试滚动文件,从而导致混乱。该实现是否允许使用某种锁定机制? - Javadoc 没有提到它。
I have a number of identical processes that are writing to a single log file using a Log4j DailyRollingFileAppender
. I am concerned that multiple processes may try and roll the file and that chaos will ensue. Does the implementation allow for this using with some kind of locking mechanism? - the Javadoc doesn't mention it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不建议让多个进程访问同一个日志文件。将会发生混乱
it is not advisible to let multiple processes access the same log file. mayhem will occur