I have a requirement that I need to store audit information in a TEXT file. I planned to write the audit information using Apache Log4j
.
Seems to be reliable option. But, I should be able to write the Audit information even the fileSize reaches 3GB.
Does the log4j
supports the fileSize even at GigaBytes
?.
Or with a Quick Question, What is the MaximumFileSize
can be supported in Log4j
.
NOTE : I could not go for RollingFileAppender or DailyFileAppender, I need to log the information Only in One text file, where some other components are reading this file content and doing some process.
By default, maximum file size is
10MB
(If you don't mention explicitly). And if you define explicitly, you can define any value uptoGB
(even 1000GB). But think, when you open this file, your machine must have an equal amount ofRAM
. So you have to take this into consideration before choosingfile size
. An example hereFileAppender
doesn't contain any field for setting file size. But its subclassesRollingFileAppender
andDailyFileAppender
contains.