| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The scheduled rotation times as ms offsets from the beginning of the day. |
| | | /** The scheduled rotation times as ms offsets from the beginning of the day. */ |
| | | private int[] rotationTimes; |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeLogRotationPolicy(FixedTimeLogRotationPolicyCfg config) |
| | | { |
| | | rotationTimes = new int[config.getTimeOfDay().size()]; |
| | |
| | | config.addFixedTimeChangeListener(this); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isConfigurationChangeAcceptable( |
| | | FixedTimeLogRotationPolicyCfg config, List<LocalizableMessage> unacceptableReasons) |
| | | { |
| | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | FixedTimeLogRotationPolicyCfg config) |
| | | { |
| | |
| | | return ccr; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean rotateFile(RotatableLogFile writer) |
| | | { |
| | | Calendar lastRotationTime = writer.getLastRotationTime(); |