cleaned logs
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@953566 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/Base.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/Base.java
index 44ecb99..62e1351 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/Base.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/Base.java
@@ -68,13 +68,13 @@
public void log(int level, String message)
{
- System.out.println("[LogService/" + level + "] " + message);
+ System.out.println(getLevel(level) + " " + message);
}
public void log(int level, String message, Throwable exception)
{
StringBuilder sb = new StringBuilder();
- sb.append("[LogService/" + level + "] ");
+ sb.append(getLevel(level) + " ");
sb.append(message);
parse(sb, exception);
System.out.println(sb.toString());
@@ -83,7 +83,7 @@
public void log(ServiceReference sr, int level, String message)
{
StringBuilder sb = new StringBuilder();
- sb.append("[LogService/" + level + "] ");
+ sb.append(getLevel(level) + " ");
sb.append(message);
System.out.println(sb.toString());
}
@@ -91,7 +91,7 @@
public void log(ServiceReference sr, int level, String message, Throwable exception)
{
StringBuilder sb = new StringBuilder();
- sb.append("[LogService/" + level + "] ");
+ sb.append(getLevel(level) + " ");
sb.append(message);
parse(sb, exception);
System.out.println(sb.toString());
@@ -108,4 +108,15 @@
sb.append(buffer.toString());
}
}
+
+ private String getLevel(int level) {
+ switch(level)
+ {
+ case LogService.LOG_DEBUG: return "DEBUG";
+ case LogService.LOG_ERROR: return "ERROR";
+ case LogService.LOG_INFO: return "INFO";
+ case LogService.LOG_WARNING: return "WARN";
+ default: return "";
+ }
+ }
}