public void publish(LogRecord record) { if(checkEntryConditions(record) == false) { return; } subPublish(record); }
public WriterHandler(OutputStream output, Formatter formatter) { setFormatter(formatter); setOutputStream(output); }
/** * Instantiate a <code>DailyRollingFileAppender</code> and open the * file designated by <code>filename</code>. The opened filename will * become the ouput destination for this appender. */ public DailyRollingFileHandler(Formatter layout, String filename, String datePattern) throws IOException { super(layout, filename, true); this.datePattern = datePattern; activateOptions(); }
/** * Instantiate a <code>FileHandler</code> and open the file * designated by <code>filename</code>. The opened filename will * become the output destination for this appender. * <p/> * <p>If the <code>append</code> parameter is true, the file will be * appended to. Otherwise, the file designated by * <code>filename</code> will be truncated before being opened. * <p/> * <p>If the <code>bufferedIO</code> parameter is <code>true</code>, * then buffered IO will be used to write to the output file. */ public FileHandler(Formatter layout, String filename, boolean append, boolean bufferedIO, int bufferSize) throws IOException { super.setFormatter(layout); this.setFile(filename, append, bufferedIO, bufferSize); }
public void setEncoding(String encoding) throws SecurityException, UnsupportedEncodingException { super.setEncoding(encoding); if (msgOutput == null) { return; } // Replace the current writer with a writer for the new encoding. flush(); if (encoding == null) { msgWriter = new OutputStreamWriter(msgOutput); } else { msgWriter = new OutputStreamWriter(msgOutput, encoding); } }
protected boolean checkEntryConditions(LogRecord record) { boolean canWrite = super.isLoggable(record); if( canWrite ) { canWrite = msgWriter != null; } return canWrite; }
public long getNextCheckMillis(Date now) { return getNextCheckDate(now).getTime(); }
public synchronized void flush() { if (msgWriter != null) { try { msgWriter.flush(); } catch (IOException e) { reportError("Failed to flush writer", e, ErrorManager.FLUSH_FAILURE); } } }
public void publish(LogRecord record) { if(checkEntryConditions(record) == false) { return; } subPublish(record); }
public WriterHandler(OutputStream output, Formatter formatter) { setFormatter(formatter); setOutputStream(output); }
/** * Instantiate a <code>FileHandler</code> and open the file * designated by <code>filename</code>. The opened filename will * become the output destination for this appender. * <p/> * <p>If the <code>append</code> parameter is true, the file will be * appended to. Otherwise, the file designated by * <code>filename</code> will be truncated before being opened. * <p/> * <p>If the <code>bufferedIO</code> parameter is <code>true</code>, * then buffered IO will be used to write to the output file. */ public FileHandler(Formatter layout, String filename, boolean append, boolean bufferedIO, int bufferSize) throws IOException { super.setFormatter(layout); this.setFile(filename, append, bufferedIO, bufferSize); }
/** * Instantiate a <code>DailyRollingFileAppender</code> and open the * file designated by <code>filename</code>. The opened filename will * become the ouput destination for this appender. */ public DailyRollingFileHandler(Formatter layout, String filename, String datePattern) throws IOException { super(layout, filename, true); this.datePattern = datePattern; activateOptions(); }
protected boolean checkEntryConditions(LogRecord record) { boolean canWrite = super.isLoggable(record); if( canWrite ) { canWrite = msgWriter != null; } return canWrite; }
public long getNextCheckMillis(Date now) { return getNextCheckDate(now).getTime(); }
public void publish(LogRecord record) { if(checkEntryConditions(record) == false) { return; } subPublish(record); }
public WriterHandler(OutputStream output, Formatter formatter) { setFormatter(formatter); setOutputStream(output); }
/** * Instantiate a <code>FileHandler</code> and open the file * designated by <code>filename</code>. The opened filename will * become the output destination for this appender. * <p/> * <p>If the <code>append</code> parameter is true, the file will be * appended to. Otherwise, the file designated by * <code>filename</code> will be truncated before being opened. * <p/> * <p>If the <code>bufferedIO</code> parameter is <code>true</code>, * then buffered IO will be used to write to the output file. * @param layout * @param filename * @param append * @param bufferedIO * @param bufferSize * @throws IOException */ public FileHandler(Formatter layout, String filename, boolean append, boolean bufferedIO, int bufferSize) throws IOException { super.setFormatter(layout); this.setFile(filename, append, bufferedIO, bufferSize); }
/** * Instantiate a <code>DailyRollingFileAppender</code> and open the * file designated by <code>filename</code>. The opened filename will * become the ouput destination for this appender. * @param layout * @param filename * @param datePattern * @throws IOException */ public DailyRollingFileHandler(Formatter layout, String filename, String datePattern) throws IOException { super(layout, filename, true); this.datePattern = datePattern; activateOptions(); }
protected boolean checkEntryConditions(LogRecord record) { boolean canWrite = super.isLoggable(record); if( canWrite ) { canWrite = msgWriter != null; } return canWrite; }
public long getNextCheckMillis(Date now) { return getNextCheckDate(now).getTime(); }