diff --git a/classpath/java/util/logging/Logger.java b/classpath/java/util/logging/Logger.java index c0ec4d8823..5a1e7ee055 100644 --- a/classpath/java/util/logging/Logger.java +++ b/classpath/java/util/logging/Logger.java @@ -67,15 +67,34 @@ public class Logger { log(level, Method.getCaller(), message, exception); } + public void logp(Level level, String sourceClass, String sourceMethod, String msg) { + if (!isLoggable(level)) { + return; + } + publish(new LogRecord(name, sourceMethod, level, msg, null)); + } + + public void logp(Level level, String sourceClass, String sourceMethod, + String msg, Throwable thrown) { + if (!isLoggable(level)) { + return; + } + publish(new LogRecord(name, sourceMethod, level, msg, thrown)); + } + private void log(Level level, Method caller, String message, Throwable exception) { if (level.intValue()