We are facing space crunch issues with Wily logs as its generating multiple logs and no retention policy exists. Currently logs were rolled up based on size 20MB but old logs are not retention due to that there were thousands of logs exist in log path. We are thinking to role up base on time which means only 7 days logs files should exist and beyond 7 days logs should be retention or archived in any remote server or else where. Please let us know your proposed setting.
The Agent and the EM work the same way with log rolling.
So to clear up some points:
1. Log rolling only takes into account the size of each log file (log4j.appender.logfile.MaxFileSize) and the # of log files (log4j.appender.logfile.MaxBackupIndex
2. The log file names will look like:
3. In your attachment, this snippet appears to be the name of the log files but appended with dates and times. With this type of format, there isn't any way to match up a log file name to do log rotation, therefore each time the log gets to a certain size, it creates a new log file.
-rw-r--r-- 1 root root 203673 Jun 20 07:53 IntroscopeAgent.20180620-075326.log
-rw-r--r-- 1 root root 897489 Jun 20 07:53 AutoProbe.20180620-075322.log
-rw-r--r-- 1 root root 203673 Jun 20 07:53 IntroscopeAgent.20180620-075341.log
-rw-r--r-- 1 root root 897489 Jun 20 07:53 AutoProbe.20180620-075337.log
-rw-r--r-- 1 root root 203673 Jun 20 07:54 IntroscopeAgent.20180620-075356.log
-rw-r--r-- 1 root root 897489 Jun 20 07:54 AutoProbe.20180620-075352.log