reportError("Missing DatePattern option in rollOver().", null, ErrorManager.OPEN_FAILURE); return; reportError("Failed to rename [" + fileName + "] to [" + scheduledFilename + "].", null, ErrorManager.OPEN_FAILURE); reportError("setFile(" + fileName + ", false) call failed.", null, ErrorManager.OPEN_FAILURE);
public void activateOptions() { super.activateOptions(); if (datePattern != null && fileName != null) { now.setTime(System.currentTimeMillis()); sdf = new SimpleDateFormat(datePattern); int type = computeCheckPeriod(); printPeriodicity(type); rc.setType(type); File file = new File(fileName); scheduledFilename = fileName + sdf.format(new Date(file.lastModified())); } else { reportError("Either File or DatePattern options are not set for appender [" + name + "].", null, ErrorManager.OPEN_FAILURE); } }
public void activateOptions() { super.activateOptions(); if (datePattern != null && fileName != null) { now.setTime(System.currentTimeMillis()); sdf = new SimpleDateFormat(datePattern); int type = computeCheckPeriod(); printPeriodicity(type); rc.setType(type); File file = new File(fileName); scheduledFilename = fileName + sdf.format(new Date(file.lastModified())); } else { reportError("Either File or DatePattern options are not set for appender [" + name + "].", null, ErrorManager.OPEN_FAILURE); } }
public void activateOptions() { super.activateOptions(); if (datePattern != null && fileName != null) { now.setTime(System.currentTimeMillis()); sdf = new SimpleDateFormat(datePattern); int type = computeCheckPeriod(); printPeriodicity(type); rc.setType(type); File file = new File(fileName); scheduledFilename = fileName + sdf.format(new Date(file.lastModified())); } else { reportError("Either File or DatePattern options are not set for appender [" + name + "].", null, ErrorManager.OPEN_FAILURE); } }
reportError("Missing DatePattern option in rollOver().", null, ErrorManager.OPEN_FAILURE); return; reportError("Failed to rename [" + fileName + "] to [" + scheduledFilename + "].", null, ErrorManager.OPEN_FAILURE); reportError("setFile(" + fileName + ", false) call failed.", null, ErrorManager.OPEN_FAILURE);
reportError("Missing DatePattern option in rollOver().", null, ErrorManager.OPEN_FAILURE); return; reportError("Failed to rename [" + fileName + "] to [" + scheduledFilename + "].", null, ErrorManager.OPEN_FAILURE); reportError("setFile(" + fileName + ", false) call failed.", null, ErrorManager.OPEN_FAILURE);
/** * This method differentiates DailyRollingFileAppender from its * super class. * <p/> * <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 subPublish(LogRecord event) { long n = System.currentTimeMillis(); if (n >= nextCheck) { now.setTime(n); nextCheck = rc.getNextCheckMillis(now); try { rollOver(); } catch (IOException ioe) { reportError("rollOver() failed.", ioe, ErrorManager.OPEN_FAILURE); } } super.subPublish(event); } }
/** * This method differentiates DailyRollingFileAppender from its * super class. * <p/> * <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 subPublish(LogRecord event) { long n = System.currentTimeMillis(); if (n >= nextCheck) { now.setTime(n); nextCheck = rc.getNextCheckMillis(now); try { rollOver(); } catch (IOException ioe) { reportError("rollOver() failed.", ioe, ErrorManager.OPEN_FAILURE); } } super.subPublish(event); } }
/** * This method differentiates DailyRollingFileAppender from its * super class. * <p/> * <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 subPublish(LogRecord event) { long n = System.currentTimeMillis(); if (n >= nextCheck) { now.setTime(n); nextCheck = rc.getNextCheckMillis(now); try { rollOver(); } catch (IOException ioe) { reportError("rollOver() failed.", ioe, ErrorManager.OPEN_FAILURE); } } super.subPublish(event); } }
break; default: reportError("Unknown periodicity for appender [" + name + "].", null, ErrorManager.FORMAT_FAILURE);
break; default: reportError("Unknown periodicity for appender [" + name + "].", null, ErrorManager.FORMAT_FAILURE);
break; default: reportError("Unknown periodicity for appender [" + name + "].", null, ErrorManager.FORMAT_FAILURE);