/** This method is called by the {@link AppenderSkeleton#doAppend} method. <p>If the output stream exists and is writable then write a log statement to the output stream. Otherwise, write a single warning message to <code>System.err</code>. <p>The format of the output will depend on this appender's layout. */ public void append(LoggingEvent event) { // Reminder: the nesting of calls is: // // doAppend() // - check threshold // - filter // - append(); // - checkEntryConditions(); // - subAppend(); if(!checkEntryConditions()) { return; } subAppend(event); }
/** This method is called by the {@link AppenderSkeleton#doAppend} method. <p>If the output stream exists and is writable then write a log statement to the output stream. Otherwise, write a single warning message to <code>System.err</code>. <p>The format of the output will depend on this appender's layout. */ public void append(LoggingEvent event) { // Reminder: the nesting of calls is: // // doAppend() // - check threshold // - filter // - append(); // - checkEntryConditions(); // - subAppend(); if(!checkEntryConditions()) { return; } subAppend(event); }
/** This method is called by the {@link AppenderSkeleton#doAppend} method. <p>If the output stream exists and is writable then write a log statement to the output stream. Otherwise, write a single warning message to <code>System.err</code>. <p>The format of the output will depend on this appender's layout. */ public void append(LoggingEvent event) { // Reminder: the nesting of calls is: // // doAppend() // - check threshold // - filter // - append(); // - checkEntryConditions(); // - subAppend(); if(!checkEntryConditions()) { return; } subAppend(event); }
/** This method differentiates RollingFileAppender from its super class. @since 0.9.0 */ protected void subAppend(LoggingEvent event) { super.subAppend(event); if((fileName != null) && ((CountingQuietWriter) qw).getCount() >= maxFileSize) this.rollOver(); } }
@Override protected void subAppend(LoggingEvent event) { appendLock.lock(); try { super.subAppend(event); append.signal(); } finally { appendLock.unlock(); } }
/** * This method differentiates DailyRollingFileAppender from its * super class. * * <p>Before actually logging, this method will check whether it is * time to do a rollover. If it is, it will schedule the next * rollover time and then rollover. * */ protected void subAppend(LoggingEvent event) { long n = System.currentTimeMillis(); if (n >= nextCheck) { now.setTime(n); nextCheck = rc.getNextCheckMillis(now); try { rollOver(); } catch(IOException ioe) { LogLog.error("rollOver() failed.", ioe); } } super.subAppend(event); } }
@Override protected void subAppend( LoggingEvent event ) { super.subAppend(event); this.events.add(event); }
/** This method is called by the {@link AppenderSkeleton#doAppend} method. <p>If the output stream exists and is writable then write a log statement to the output stream. Otherwise, write a single warning message to <code>System.err</code>. <p>The format of the output will depend on this appender's layout. */ public void append(LoggingEvent event) { // Reminder: the nesting of calls is: // // doAppend() // - check threshold // - filter // - append(); // - checkEntryConditions(); // - subAppend(); if(!checkEntryConditions()) { return; } subAppend(event); }
/** This method differentiates RollingFileAppender from its super class. @since 0.9.0 */ protected void subAppend(LoggingEvent event) { super.subAppend(event); if(fileName != null && qw != null) { long size = ((CountingQuietWriter) qw).getCount(); if (size >= maxFileSize && size >= nextRollover) { rollOver(); } } } }
@Override protected void subAppend(LoggingEvent event) { appendLock.lock(); try { super.subAppend(event); append.signal(); } finally { appendLock.unlock(); } }
/** This method differentiates RollingFileAppender from its super class. @since 0.9.0 */ protected void subAppend(LoggingEvent event) { super.subAppend(event); if(fileName != null && qw != null) { long size = ((CountingQuietWriter) qw).getCount(); if (size >= maxFileSize && size >= nextRollover) { rollOver(); } } } }
/** This method differentiates RollingFileAppender from its super class. @since 0.9.0 */ protected void subAppend(LoggingEvent event) { super.subAppend(event); if(fileName != null && qw != null) { long size = ((CountingQuietWriter) qw).getCount(); if (size >= maxFileSize && size >= nextRollover) { rollOver(); } } } }
/** This method differentiates RollingFileAppender from its super class. @since 0.9.0 */ protected void subAppend(LoggingEvent event) { super.subAppend(event); if(fileName != null && qw != null) { long size = ((CountingQuietWriter) qw).getCount(); if (size >= maxFileSize && size >= nextRollover) { rollOver(); } } } }
/** This method differentiates RollingFileAppender from its super class. @since 0.9.0 */ protected void subAppend(LoggingEvent event) { super.subAppend(event); if(fileName != null && qw != null) { long size = ((CountingQuietWriter) qw).getCount(); if (size >= maxFileSize && size >= nextRollover) { rollOver(); } } } }
/** * This method differentiates DailyRollingFileAppender from its * super class. * * <p>Before actually logging, this method will check whether it is * time to do a rollover. If it is, it will schedule the next * rollover time and then rollover. * */ protected void subAppend(LoggingEvent event) { long n = System.currentTimeMillis(); if (n >= nextCheck) { now.setTime(n); nextCheck = rc.getNextCheckMillis(now); try { rollOver(); } catch(IOException ioe) { LogLog.error("rollOver() failed.", ioe); } } super.subAppend(event); } }
/** * This method differentiates DailyRollingFileAppender from its * super class. * * <p>Before actually logging, this method will check whether it is * time to do a rollover. If it is, it will schedule the next * rollover time and then rollover. * */ protected void subAppend(LoggingEvent event) { long n = System.currentTimeMillis(); if (n >= nextCheck) { now.setTime(n); nextCheck = rc.getNextCheckMillis(now); try { rollOver(); } catch(IOException ioe) { LogLog.error("rollOver() failed.", ioe); } } super.subAppend(event); } }
/** * Overrides WriterAppender.subAppend(), which does the real logging. No need * to worry about concurrency since log4j calls this synchronously. */ @Override protected void subAppend(LoggingEvent event) { super.subAppend(event); // That should've gone into our writer. Notify the LogContext. String logOutput = writer.toString(); writer.reset(); OperationLog log = operationManager.getOperationLogByThread(); if (log == null) { LOG.debug(" ---+++=== Dropped log event from thread " + event.getThreadName()); return; } log.writeOperationLog(logOutput); } }
/** * Overrides WriterAppender.subAppend(), which does the real logging. No need * to worry about concurrency since log4j calls this synchronously. */ @Override protected void subAppend(LoggingEvent event) { super.subAppend(event); // That should've gone into our writer. Notify the LogContext. String logOutput = writer.toString(); writer.reset(); OperationLog log = operationManager.getOperationLogByThread(); if (log == null) { LOG.debug(" ---+++=== Dropped log event from thread " + event.getThreadName()); return; } log.writeOperationLog(logOutput); } }
/** * Overrides WriterAppender.subAppend(), which does the real logging. No need * to worry about concurrency since log4j calls this synchronously. */ @Override protected void subAppend(LoggingEvent event) { super.subAppend(event); // That should've gone into our writer. Notify the LogContext. String logOutput = writer.toString(); writer.reset(); OperationLog log = operationManager.getOperationLogByThread(); if (log == null) { LOG.debug(" ---+++=== Dropped log event from thread " + event.getThreadName()); return; } log.writeOperationLog(logOutput); } }
/** * Overrides WriterAppender.subAppend(), which does the real logging. No need * to worry about concurrency since log4j calls this synchronously. */ @Override protected void subAppend(LoggingEvent event) { super.subAppend(event); // That should've gone into our writer. Notify the LogContext. String logOutput = writer.toString(); writer.reset(); OperationLog log = operationManager.getOperationLogByThread(); if (log == null) { LOG.debug(" ---+++=== Dropped log event from thread " + event.getThreadName()); return; } log.writeOperationLog(logOutput); } }