void startArchiving ( ) { if ( isArchivingDisabled ( ) ) { return ; } String archiveName = configuration . get ( JFunkConstants . ARCHIVE_FILE ) ; if ( StringUtils . isBlank ( archiveName ) ) { archiveName = String . format ( DIR_PATTERN , moduleMetaData . getModuleName ( ) , Thread . currentThread ( ) . getName ( ) , FORMAT . format ( moduleMetaData . getStartDate ( ) ) ) ; } moduleArchiveDir = new File ( archiveDir , archiveName ) ; if ( moduleArchiveDir . exists ( ) ) { log . warn ( "Archive directory already exists: {}" , moduleArchiveDir ) ; } else { moduleArchiveDir . mkdirs ( ) ; } addModuleAppender ( ) ; log . info ( "Started archiving: (module={}, moduleArchiveDir={})" , moduleMetaData . getModuleName ( ) , moduleArchiveDir ) ; }
Starts archiving of the specified module if archiving is enabled .