[FELIX-4942] Improve Logger to provide isDebugEnabled() and debug() methods
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1690700 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/resolver/src/main/java/org/apache/felix/resolver/Logger.java b/resolver/src/main/java/org/apache/felix/resolver/Logger.java
index fd3a8a7..dbcaee9 100644
--- a/resolver/src/main/java/org/apache/felix/resolver/Logger.java
+++ b/resolver/src/main/java/org/apache/felix/resolver/Logger.java
@@ -75,14 +75,23 @@
_log(level, msg, throwable);
}
+ public boolean isDebugEnabled()
+ {
+ return m_logLevel >= LOG_DEBUG;
+ }
+
+ public final void debug(String msg)
+ {
+ _log(LOG_DEBUG, msg, null);
+ }
+
protected void doLog(int level, String msg, Throwable throwable)
{
if (level > m_logLevel)
{
return;
}
- String s = "";
- s = s + msg;
+ String s = msg;
if (throwable != null)
{
s = s + " (" + throwable + ")";