Sorry if I am just not finding this in already published doc but does the RollingFileAppender have a roll on timestamp option? My older log4j code has configured the log file names as logname-yyyy-mm-dd-HH.log as the log names, creating new based on the hour instead of any size limit. Is this possible without creating my own custom appender?
I admit, I may have simply not found the correct google recipe to find this answer, so be gentle.
The RollingFileAppender only rotates by max size. Truthfully, that’s preferable to a daily-only rotation as it prevents an unexpected error ( or some sort of DoS attack ) from creating log files that are gigabytes in size. Since those files all have the date created in the name ( as well as the sequence in the day ), it’s pretty easy to scan the directory to find log files for a particular day.
If you are looking for searchability for your error logs, I might suggest Stachebox or Sentry.
Ok. Thanks. I think I can work with that answer. I never considered a DoS attack filling up the log drive.