simpleDateFormat.format(date, buffer, new FieldPosition(0));
return buffer.toString();
}
protected String getFileName() {
Options options = new Options();
String fixedName = options.getOption(Options.FILE_LOG_FIXED_NAME, null);
if (fixedName != null) {
maxSize = Long.MAX_VALUE;
return fixedName;
}
fileBaseName = options.getOption(Options.FILE_LOG_BASE_NAME, fileBaseName);
maxSize = options.getOptionInt(Options.FILE_LOG_MAX_SIZE, 100) * 1048576; //unit: Meg
Date date = new Date();
StringBuffer buffer = new StringBuffer("");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
simpleDateFormat.format(date, buffer, new FieldPosition(0));