Skip to content

Commit

Permalink
fix issues/860
Browse files Browse the repository at this point in the history
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
  • Loading branch information
ceki committed Dec 27, 2024
1 parent a8a2303 commit 80db86b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ public class CoreConstants {
public static final int UNBOUND_HISTORY = UNBOUNDED_HISTORY;

//public static final String RECONFIGURE_ON_CHANGE_TASK = "RECONFIGURE_ON_CHANGE_TASK";
public static final String SIZE_AND_TIME_BASED_FNATP_IS_DEPRECATED = "SizeAndTimeBasedFileNamingAndTriggeringPolicy is deprecated. Use SizeAndTimeBasedRollingPolicy instead";
public static final String SIZE_AND_TIME_BASED_FNATP_IS_DEPRECATED = "Direct use of either SizeAndTimeBasedFNATP or SizeAndTimeBasedFileNamingAndTriggeringPolicy ";
public static final String SIZE_AND_TIME_BASED_FNATP_IS_DEPRECATED_BIS = "is deprecated. Please use SizeAndTimeBasedRollingPolicy instead.";

public static final char JSON_LINE_SEPARATOR = '\n';
final public static String MODEL_CONFIG_FILE_EXTENSION = ".scmo";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Logback: the reliable, generic, fast and flexible logging framework.
* Copyright (C) 1999-2024, QOS.ch. All rights reserved.
*
* This program and the accompanying materials are dual-licensed under
* either the terms of the Eclipse Public License v1.0 as published by
* the Eclipse Foundation
*
* or (per the licensee's choosing)
*
* under the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation.
*/

package ch.qos.logback.core.rolling;

import static ch.qos.logback.core.CoreConstants.MANUAL_URL_PREFIX;

/**
* <p>{@link SizeAndTimeBasedFNATP} class was renamed as {@link SizeAndTimeBasedFileNamingAndTriggeringPolicy}
* in version 1.5.8. In version 1.5.16 it was reintroduced to preserve backward compatibility with existing
* configurations.</p>
*
*
*
* @since removed in 1.5.8 and reintroduced in 1.5.16
*/

public class SizeAndTimeBasedFNATP<E> extends SizeAndTimeBasedFileNamingAndTriggeringPolicy<E> {


@Override
public void start() {
addWarn("SizeAndTimeBasedFNATP class was renamed as SizeAndTimeBasedFileNamingAndTriggeringPolicy.");
super.start();
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@
/**
* This class implement {@link TimeBasedFileNamingAndTriggeringPolicy}
* interface extending {@link TimeBasedFileNamingAndTriggeringPolicyBase}. This class is intended to be nested
* within a {@link SizeAndTimeBasedFileNamingAndTriggeringPolicy} instance. However, it can also be instantiated directly for testing purposes.
* within a {@link SizeAndTimeBasedFileNamingAndTriggeringPolicy} instance. However, it can also be
* instantiated directly for testing purposes.
*
* <p>{@link SizeAndTimeBasedFNATP} class was renamed as {@link SizeAndTimeBasedFileNamingAndTriggeringPolicy}
* in version 1.5.8.</p>
*
* @author Ceki G&uuml;lc&uuml;
*
* @param <E>
* @since 1.5.8
*/
@NoAutoStart
public class SizeAndTimeBasedFileNamingAndTriggeringPolicy<E> extends TimeBasedFileNamingAndTriggeringPolicyBase<E> {
Expand Down Expand Up @@ -72,6 +77,7 @@ public void start() {

if (usage == Usage.DIRECT) {
addWarn(CoreConstants.SIZE_AND_TIME_BASED_FNATP_IS_DEPRECATED);
addWarn(CoreConstants.SIZE_AND_TIME_BASED_FNATP_IS_DEPRECATED_BIS);
addWarn("For more information see " + MANUAL_URL_PREFIX + "appenders.html#SizeAndTimeBasedRollingPolicy");
}

Expand Down

0 comments on commit 80db86b

Please sign in to comment.