Ejemplo n.º 1
0
 @Override
 public synchronized void publish(LogRecord record) {
   if (!isLoggable(record)) {
     return;
   }
   checkRotate();
   super.publish(record);
   super.flush();
 }
Ejemplo n.º 2
0
 @Override
 public synchronized void flush() {
   if (rotate) {
     String newFilename = calculateFilename();
     if (!filename.equals(newFilename)) {
       filename = newFilename;
       logger.log(Level.INFO, "Log rotating to {0}...", filename);
       updateOutput();
     }
   }
   super.flush();
 }
Ejemplo n.º 3
0
 @Override
 public synchronized void flush() {
   if (!filename.equals(calculateFilename())) {
     filename = calculateFilename();
     server.getLogger().log(Level.INFO, "Log rotating to {0}...", filename);
     try {
       setOutputStream(new FileOutputStream(filename, true));
     } catch (FileNotFoundException ex) {
       server
           .getLogger()
           .log(
               Level.SEVERE,
               "Unable to open {0} for writing: {1}",
               new Object[] {filename, ex.getMessage()});
       ex.printStackTrace();
     }
   }
   super.flush();
 }
Ejemplo n.º 4
0
 @Override
 public synchronized void flush() {
   checkRotate();
   super.flush();
 }
  public static void flush() {

    consoleHandler.flush();
  }
 public synchronized void publish(LogRecord record) {
   super.publish(record);
   super.flush();
 }