From c52da92599b1316c5b7216c8ecf5dab68341e861 Mon Sep 17 00:00:00 2001 From: Ceki Gulcu Date: Mon, 5 Feb 2024 22:17:54 +0100 Subject: [PATCH] revert Util.report methods removed by mistake Signed-off-by: Ceki Gulcu --- .../src/main/java/org/slf4j/helpers/Util.java | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/slf4j-api/src/main/java/org/slf4j/helpers/Util.java b/slf4j-api/src/main/java/org/slf4j/helpers/Util.java index 39a74a8a9..988583158 100755 --- a/slf4j-api/src/main/java/org/slf4j/helpers/Util.java +++ b/slf4j-api/src/main/java/org/slf4j/helpers/Util.java @@ -117,14 +117,28 @@ public static Class getCallingClass() { return trace[i + 2]; } -// private static final void report(String msg, Throwable t) { -// System.err.println(msg); -// System.err.println("Reported exception:"); -// t.printStackTrace(); -// } -// -// static final private void report(String msg) { -// System.err.println("SLF4J: " + msg); -// } + /** + * See {@link Reporter#error(String, Throwable)} class for alternative. + * + * @deprecated replaced by the {@link Reporter#error(String, Throwable)} method. + * @param msg message to print + * @param t throwable to print + */ + static final public void report(String msg, Throwable t) { + System.err.println(msg); + System.err.println("Reported exception:"); + t.printStackTrace(); + } + + /** + * See {@link Reporter} class for alternatives. + * + * @deprecated replaced by one of {@link Reporter#info(String)}, + * {@link Reporter#warn(String)} or {@link Reporter#error(String)} methods. + * @param msg message to print + */ + static final public void report(String msg) { + System.err.println("SLF4J: " + msg); + } }