private void updateDefaultTimeAndSizeRollingAppender ( final FoundationFileRollingAppender appender ) { if ( appender . getDatePattern ( ) . trim ( ) . length ( ) == 0 ) { appender . setDatePattern ( FoundationLoggerConstants . DEFAULT_DATE_PATTERN . toString ( ) ) ; } String maxFileSizeKey = "log4j.appender." + appender . getName ( ) + ".MaxFileSize" ; appender . setMaxFileSize ( FoundationLogger . log4jConfigProps . getProperty ( maxFileSizeKey , FoundationLoggerConstants . Foundation_MAX_FILE_SIZE . toString ( ) ) ) ; // if (appender.getMaxFileSize() == null || appender.getMaxFileSize().equals(FoundationLoggerConstants.DEFAULT_FILE_SIZE.toString())) { // appender.setMaxFileSize(FoundationLoggerConstants.Foundation_MAX_FILE_SIZE.toString()); // } String maxRollCountKey = "log4j.appender." + appender . getName ( ) + ".MaxRollFileCount" ; appender . setMaxRollFileCount ( Integer . parseInt ( FoundationLogger . log4jConfigProps . getProperty ( maxRollCountKey , "100" ) ) ) ; }
Set default values for the TimeAndSizeRollingAppender appender