@Override StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) { if (timeStamp == null) return builder.append('-'); final SimpleDateFormat format = simpleDateFormat.get(); format.setTimeZone(timeZone); return builder.append(format.format(timeStamp)); }
@Override StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) { if (timeStamp == null) return builder.append('-'); final SimpleDateFormat format = simpleDateFormat.get(); format.setTimeZone(timeZone); return builder.append(format.format(timeStamp)); }
@Override StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) { if (timeStamp == null) return builder.append('-'); final SimpleDateFormat format = simpleDateFormat.get(); format.setTimeZone(timeZone); return builder.append(format.format(timeStamp)); }
@Override StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) { if (timeStamp == null) return builder.append('-'); final SimpleDateFormat format = simpleDateFormat.get(); format.setTimeZone(timeZone); return builder.append(format.format(timeStamp)); }
@Override StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) { if (timeStamp == null) return builder.append('-'); final SimpleDateFormat format = simpleDateFormat.get(); format.setTimeZone(timeZone); return builder.append(format.format(timeStamp)); }
@Override StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) { if (timeStamp == null) return builder.append('-'); final SimpleDateFormat format = simpleDateFormat.get(); format.setTimeZone(timeZone); return builder.append(format.format(timeStamp)); }
@Override StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) { if (timeStamp == null) return builder.append('-'); final SimpleDateFormat format = simpleDateFormat.get(); format.setTimeZone(timeZone); return builder.append(format.format(timeStamp)); }
@Override StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) { if (timeStamp == null) return builder.append('-'); final SimpleDateFormat format = simpleDateFormat.get(); format.setTimeZone(timeZone); return builder.append(format.format(timeStamp)); }
@Override StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) { if (timeStamp == null) return builder.append('-'); final SimpleDateFormat format = simpleDateFormat.get(); format.setTimeZone(timeZone); return builder.append(format.format(timeStamp)); }
@Override StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) { if (timeStamp == null) return builder.append('-'); final SimpleDateFormat format = simpleDateFormat.get(); format.setTimeZone(timeZone); return builder.append(format.format(timeStamp)); }
@Override StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) { if (timeStamp == null) return builder.append('-'); final SimpleDateFormat format = simpleDateFormat.get(); format.setTimeZone(timeZone); return builder.append(format.format(timeStamp)); }
private RotatingFileAppender(String filePattern, String archivePattern, File directory) throws IOException { this.directory = directory.getCanonicalFile(); archiveFormat = new SimpleDateFormatThreadLocal(archivePattern); fileFormat = new SimpleDateFormatThreadLocal(filePattern); final Date now = new Date(); currentArchive = new File(directory, archiveFormat.get().format(now)).getCanonicalFile(); currentFile = new File(directory, fileFormat.get().format(now)).getCanonicalFile(); /* Validate the arguments */ if (!this.directory.equals(currentArchive.getParentFile())) throw new IllegalArgumentException("Archive file \"" + currentArchive + "\" is not a child of the configured directory \"" + this.directory + "\""); if (!this.directory.equals(currentFile.getParentFile())) throw new IllegalArgumentException("Access log file \"" + currentFile + "\" is not a child of the configured directory \"" + this.directory + "\""); if (currentArchive.equals(currentFile)) throw new IllegalArgumentException("Access log file and archive file point to the same file \"" + currentFile + "\""); /* Validated, we can open files */ appender = new FileAppender(currentFile, true); }
private RotatingFileAppender(String filePattern, String archivePattern, File directory) throws IOException { this.directory = directory.getCanonicalFile(); archiveFormat = new SimpleDateFormatThreadLocal(archivePattern); fileFormat = new SimpleDateFormatThreadLocal(filePattern); final Date now = new Date(); currentArchive = new File(directory, archiveFormat.get().format(now)).getCanonicalFile(); currentFile = new File(directory, fileFormat.get().format(now)).getCanonicalFile(); /* Validate the arguments */ if (!this.directory.equals(currentArchive.getParentFile())) throw new IllegalArgumentException("Archive file \"" + currentArchive + "\" is not a child of the configured directory \"" + this.directory + "\""); if (!this.directory.equals(currentFile.getParentFile())) throw new IllegalArgumentException("Access log file \"" + currentFile + "\" is not a child of the configured directory \"" + this.directory + "\""); if (currentArchive.equals(currentFile)) throw new IllegalArgumentException("Access log file and archive file point to the same file \"" + currentFile + "\""); /* Validated, we can open files */ appender = new FileAppender(currentFile, true); }
private RotatingFileAppender(String filePattern, String archivePattern, File directory) throws IOException { this.directory = directory.getCanonicalFile(); archiveFormat = new SimpleDateFormatThreadLocal(archivePattern); fileFormat = new SimpleDateFormatThreadLocal(filePattern); final Date now = new Date(); currentArchive = new File(directory, archiveFormat.get().format(now)).getCanonicalFile(); currentFile = new File(directory, fileFormat.get().format(now)).getCanonicalFile(); /* Validate the arguments */ if (!this.directory.equals(currentArchive.getParentFile())) throw new IllegalArgumentException("Archive file \"" + currentArchive + "\" is not a child of the configured directory \"" + this.directory + "\""); if (!this.directory.equals(currentFile.getParentFile())) throw new IllegalArgumentException("Access log file \"" + currentFile + "\" is not a child of the configured directory \"" + this.directory + "\""); if (currentArchive.equals(currentFile)) throw new IllegalArgumentException("Access log file and archive file point to the same file \"" + currentFile + "\""); /* Validated, we can open files */ appender = new FileAppender(currentFile, true); }
private RotatingFileAppender(String filePattern, String archivePattern, File directory) throws IOException { this.directory = directory.getCanonicalFile(); archiveFormat = new SimpleDateFormatThreadLocal(archivePattern); fileFormat = new SimpleDateFormatThreadLocal(filePattern); final Date now = new Date(); currentArchive = new File(directory, archiveFormat.get().format(now)).getCanonicalFile(); currentFile = new File(directory, fileFormat.get().format(now)).getCanonicalFile(); /* Validate the arguments */ if (!this.directory.equals(currentArchive.getParentFile())) throw new IllegalArgumentException("Archive file \"" + currentArchive + "\" is not a child of the configured directory \"" + this.directory + "\""); if (!this.directory.equals(currentFile.getParentFile())) throw new IllegalArgumentException("Access log file \"" + currentFile + "\" is not a child of the configured directory \"" + this.directory + "\""); if (currentArchive.equals(currentFile)) throw new IllegalArgumentException("Access log file and archive file point to the same file \"" + currentFile + "\""); /* Validated, we can open files */ appender = new FileAppender(currentFile, true); }
private RotatingFileAppender(String filePattern, String archivePattern, File directory) throws IOException { this.directory = directory.getCanonicalFile(); archiveFormat = new SimpleDateFormatThreadLocal(archivePattern); fileFormat = new SimpleDateFormatThreadLocal(filePattern); final Date now = new Date(); currentArchive = new File(directory, archiveFormat.get().format(now)).getCanonicalFile(); currentFile = new File(directory, fileFormat.get().format(now)).getCanonicalFile(); /* Validate the arguments */ if (!this.directory.equals(currentArchive.getParentFile())) throw new IllegalArgumentException("Archive file \"" + currentArchive + "\" is not a child of the configured directory \"" + this.directory + "\""); if (!this.directory.equals(currentFile.getParentFile())) throw new IllegalArgumentException("Access log file \"" + currentFile + "\" is not a child of the configured directory \"" + this.directory + "\""); if (currentArchive.equals(currentFile)) throw new IllegalArgumentException("Access log file and archive file point to the same file \"" + currentFile + "\""); /* Validated, we can open files */ appender = new FileAppender(currentFile, true); }
private RotatingFileAppender(String filePattern, String archivePattern, File directory) throws IOException { this.directory = directory.getCanonicalFile(); archiveFormat = new SimpleDateFormatThreadLocal(archivePattern); fileFormat = new SimpleDateFormatThreadLocal(filePattern); final Date now = new Date(); currentArchive = new File(directory, archiveFormat.get().format(now)).getCanonicalFile(); currentFile = new File(directory, fileFormat.get().format(now)).getCanonicalFile(); /* Validate the arguments */ if (!this.directory.equals(currentArchive.getParentFile())) throw new IllegalArgumentException("Archive file \"" + currentArchive + "\" is not a child of the configured directory \"" + this.directory + "\""); if (!this.directory.equals(currentFile.getParentFile())) throw new IllegalArgumentException("Access log file \"" + currentFile + "\" is not a child of the configured directory \"" + this.directory + "\""); if (currentArchive.equals(currentFile)) throw new IllegalArgumentException("Access log file and archive file point to the same file \"" + currentFile + "\""); /* Validated, we can open files */ appender = new FileAppender(currentFile, true); }
private RotatingFileAppender(String filePattern, String archivePattern, File directory) throws IOException { this.directory = directory.getCanonicalFile(); archiveFormat = new SimpleDateFormatThreadLocal(archivePattern); fileFormat = new SimpleDateFormatThreadLocal(filePattern); final Date now = new Date(); currentArchive = new File(directory, archiveFormat.get().format(now)).getCanonicalFile(); currentFile = new File(directory, fileFormat.get().format(now)).getCanonicalFile(); /* Validate the arguments */ if (!this.directory.equals(currentArchive.getParentFile())) throw new IllegalArgumentException("Archive file \"" + currentArchive + "\" is not a child of the configured directory \"" + this.directory + "\""); if (!this.directory.equals(currentFile.getParentFile())) throw new IllegalArgumentException("Access log file \"" + currentFile + "\" is not a child of the configured directory \"" + this.directory + "\""); if (currentArchive.equals(currentFile)) throw new IllegalArgumentException("Access log file and archive file point to the same file \"" + currentFile + "\""); /* Validated, we can open files */ appender = new FileAppender(currentFile, true); }
private RotatingFileAppender(String filePattern, String archivePattern, File directory) throws IOException { this.directory = directory.getCanonicalFile(); archiveFormat = new SimpleDateFormatThreadLocal(archivePattern); fileFormat = new SimpleDateFormatThreadLocal(filePattern); final Date now = new Date(); currentArchive = new File(directory, archiveFormat.get().format(now)).getCanonicalFile(); currentFile = new File(directory, fileFormat.get().format(now)).getCanonicalFile(); /* Validate the arguments */ if (!this.directory.equals(currentArchive.getParentFile())) throw new IllegalArgumentException("Archive file \"" + currentArchive + "\" is not a child of the configured directory \"" + this.directory + "\""); if (!this.directory.equals(currentFile.getParentFile())) throw new IllegalArgumentException("Access log file \"" + currentFile + "\" is not a child of the configured directory \"" + this.directory + "\""); if (currentArchive.equals(currentFile)) throw new IllegalArgumentException("Access log file and archive file point to the same file \"" + currentFile + "\""); /* Validated, we can open files */ appender = new FileAppender(currentFile, true); }
private RotatingFileAppender(String filePattern, String archivePattern, File directory) throws IOException { this.directory = directory.getCanonicalFile(); archiveFormat = new SimpleDateFormatThreadLocal(archivePattern); fileFormat = new SimpleDateFormatThreadLocal(filePattern); final Date now = new Date(); currentArchive = new File(directory, archiveFormat.get().format(now)).getCanonicalFile(); currentFile = new File(directory, fileFormat.get().format(now)).getCanonicalFile(); /* Validate the arguments */ if (!this.directory.equals(currentArchive.getParentFile())) throw new IllegalArgumentException("Archive file \"" + currentArchive + "\" is not a child of the configured directory \"" + this.directory + "\""); if (!this.directory.equals(currentFile.getParentFile())) throw new IllegalArgumentException("Access log file \"" + currentFile + "\" is not a child of the configured directory \"" + this.directory + "\""); if (currentArchive.equals(currentFile)) throw new IllegalArgumentException("Access log file and archive file point to the same file \"" + currentFile + "\""); /* Validated, we can open files */ appender = new FileAppender(currentFile, true); }