Can log4j compress a log file after file size pass 2MB?

In the log4j extras project log4j extras project there are many useful appenders that can be used. In particular the with the RollingFileAppender configured with the TimeBasedRollingPolicy can automatically compress the rolled file. I don't know if the SizeBasedTriggeringPolicy does the same, and the documentation is scarse.

In the log4j extras projectlog4j extras project there are many useful appenders that can be used. In particular the with the RollingFileAppender configured with the TimeBasedRollingPolicy can automatically compress the rolled file. I don't know if the SizeBasedTriggeringPolicy does the same, and the documentation is scarse.

I think that it would be easy to build a custom RollingPolicy that is SizeBased and compress the output, given that all the ingredients are present in the Log4j extras project (even the compression of the file). It is basically the same code as the TimeBased policy, implementing the isTriggeringEvent method to be the same as the SizeBased policy. Or something like that.

Basically to overcome the size limit of log files, we used to create appenders log files if size limit increase beyond max size. Please check below articleRolling file appenders.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions