What is the best size for a log file in LOG4J?

I have an application that runs slowly. This is due to the huge number of records at the DEBUG and INFO levels inside the code. I made some changes to the code and changed the WARN log level, and now it works well.

But there is only one log file (currently 1.6 GB). I want to use RollingFileAppender to get more smaller files. What is the best (maximum) size I should use for the application's MaxFileSize property so that performance does not degrade?

+3
source share
2 answers

, , , . log4j , , .

, DailyRollingFileAppender. - "" " ".

+2

, .

, - hdd. WARN , DEBUG INFO - . , hdd.

- . INFO , 2 , .

:

, . , . , , 10 . , , 1 , ... 1 , , .

0

Source: https://habr.com/ru/post/1715410/


All Articles