From 0aa368d457a7057cbdaed55fd6dd26000a9e89ae Mon Sep 17 00:00:00 2001 From: Jonas Tobias Hopusch Date: Sat, 12 Mar 2022 03:51:52 +0100 Subject: [PATCH] Make waiting confirmation message output via logger --- src/main/java/de/jotoho/waituntil/Sleep.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/jotoho/waituntil/Sleep.java b/src/main/java/de/jotoho/waituntil/Sleep.java index a5c56bd..072c69b 100644 --- a/src/main/java/de/jotoho/waituntil/Sleep.java +++ b/src/main/java/de/jotoho/waituntil/Sleep.java @@ -25,6 +25,8 @@ import java.time.format.FormatStyle; import java.time.temporal.ChronoUnit; import java.util.TimeZone; +import static java.lang.System.Logger.Level; + public final class Sleep { public static void waitUntilTimeStamp(ZonedDateTime timestamp) { try { @@ -43,6 +45,6 @@ public final class Sleep { }; final String msgWithData = msg.formatted(formattedTimeStamp); - System.err.println(msgWithData); + System.getLogger("sleep").log(Level.INFO, msgWithData); } }