From fc13c10d98a5c7127c0753792df0b953f82104f7 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 28 Jun 2018 15:56:44 +0300 Subject: [PATCH] Fix Logger.info --- .../teavm/classlib/java/util/logging/TLogger.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/classlib/src/main/java/org/teavm/classlib/java/util/logging/TLogger.java b/classlib/src/main/java/org/teavm/classlib/java/util/logging/TLogger.java index 9ea055cc2..0729a0a11 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/util/logging/TLogger.java +++ b/classlib/src/main/java/org/teavm/classlib/java/util/logging/TLogger.java @@ -34,6 +34,10 @@ public class TLogger { this.name = name; } + public static TLogger getGlobal() { + return getLogger(GLOBAL_LOGGER_NAME); + } + public static TLogger getLogger(TString name) { TLogger logger = loggerCache.get(name); if (logger == null) { @@ -61,7 +65,7 @@ public class TLogger { } else if (record.getLevel().intValue() >= TLevel.WARNING.intValue()) { warn(message); } else { - info(message); + infoImpl(message); } } @@ -138,6 +142,10 @@ public class TLogger { log(TLevel.WARNING, msg); } + public void info(TString msg) { + log(TLevel.INFO, msg); + } + public void config(TString msg) { log(TLevel.CONFIG, msg); } @@ -174,7 +182,7 @@ public class TLogger { + "if (console) {" + "console.info(message);" + "}") - public static native void info(TString message); + private static native void infoImpl(TString message); @JSBody(params = "message", script = "" + "if (console) {"