
org.ogema.impl.logging.HousekeepingPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ogema-logger Show documentation
Show all versions of ogema-logger Show documentation
Reference implementation of the OGEMA 2.0 logger by Fraunhofer Society.
The newest version!
/**
* Copyright 2011-2018 Fraunhofer-Gesellschaft zur Förderung der angewandten Wissenschaften e.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ogema.impl.logging;
import ch.qos.logback.core.rolling.RolloverFailure;
import ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP;
import ch.qos.logback.core.rolling.TimeBasedRollingPolicy;
import ch.qos.logback.core.rolling.helper.FileFilterUtil;
import ch.qos.logback.core.rolling.helper.FileNamePattern;
import ch.qos.logback.core.util.FileSize;
import java.io.File;
import java.util.Comparator;
import java.util.PriorityQueue;
/**
* The rolling policy for the default OGEMA logger, basically a logback {@link TimeBasedRollingPolicy} using a
* {@link SizeAndTimeBasedFNATP} triggering policy with added housekeeping for a maximum total size of all log files.
*
* @author jlapp
*/
public class HousekeepingPolicy extends TimeBasedRollingPolicy
© 2015 - 2025 Weber Informatics LLC | Privacy Policy