protected void rotateLogFiles(String generationSuffix, boolean mergeOld) throws IOException { for (Logger l : fileHandlers.keySet()) { GenerationFileHandler gfh = (GenerationFileHandler) fileHandlers.get(l); GenerationFileHandler newGfh = gfh.rotate(generationSuffix, "", mergeOld); if (gfh.shouldManifest()) { addToManifest((String) newGfh.getFilenameSeries().get(1), MANIFEST_LOG_FILE, newGfh.shouldManifest()); } l.removeHandler(gfh); l.addHandler(newGfh); fileHandlers.put(l, newGfh); } }
/** * Move the current file to a new filename with the storeSuffix in place * of the activeSuffix; continuing logging to a new file under the * original filename. * * @param storeSuffix Suffix to put in place of <code>activeSuffix</code> * @param activeSuffix Suffix to replace with <code>storeSuffix</code>. * @return GenerationFileHandler instance. * @throws IOException */ public GenerationFileHandler rotate(String storeSuffix, String activeSuffix) throws IOException { return rotate(storeSuffix, activeSuffix, false); }
/** * Move the current file to a new filename with the storeSuffix in place * of the activeSuffix; continuing logging to a new file under the * original filename. * * @param storeSuffix Suffix to put in place of <code>activeSuffix</code> * @param activeSuffix Suffix to replace with <code>storeSuffix</code>. * @return GenerationFileHandler instance. * @throws IOException */ public GenerationFileHandler rotate(String storeSuffix, String activeSuffix) throws IOException { return rotate(storeSuffix, activeSuffix, false); }
/** * Move the current file to a new filename with the storeSuffix in place * of the activeSuffix; continuing logging to a new file under the * original filename. * * @param storeSuffix Suffix to put in place of <code>activeSuffix</code> * @param activeSuffix Suffix to replace with <code>storeSuffix</code>. * @return GenerationFileHandler instance. * @throws IOException */ public GenerationFileHandler rotate(String storeSuffix, String activeSuffix) throws IOException { return rotate(storeSuffix, activeSuffix, false); }
protected void rotateLogFiles(String generationSuffix, boolean mergeOld) throws IOException { for (Logger l : fileHandlers.keySet()) { GenerationFileHandler gfh = (GenerationFileHandler) fileHandlers.get(l); GenerationFileHandler newGfh = gfh.rotate(generationSuffix, "", mergeOld); if (gfh.shouldManifest()) { addToManifest((String) newGfh.getFilenameSeries().get(1), MANIFEST_LOG_FILE, newGfh.shouldManifest()); } l.removeHandler(gfh); l.addHandler(newGfh); fileHandlers.put(l, newGfh); } }