Java – can log4j restore integrity from disk?

We run several Java application servers and several applications here They all use log4j to log into the same file system, which is why we created them

log4j:ERROR Failed to flush writer,java.io.IOException

Unfortunately, log4j cannot recover from this error, so logs will not be written from the application even after space is freed up in the file system In addition to restarting the application, is there any option, programming mode or setting mode for log4j to run again?

Solution

Do you think this is an acceptable result? I will consider writing a new appender to wrap any appender access disk and try to do something reasonable when ioexceptions are detected Perhaps let it wrap the underlying appender write method in a try catch block and send an email to you or your system administrator

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>