summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Campo2008-02-11 12:01:45 (EST)
committerChristian Campo2008-02-11 12:01:45 (EST)
commit3c922fff52af4c952a2fb1f7d013f3b56827394e (patch)
treeebbf66d359e904115508c7328fe6ab88ae3833fc
parent202fced9b6f697e0963c0fcdcd979ece3a8ef05c (diff)
downloadorg.eclipse.riena-3c922fff52af4c952a2fb1f7d013f3b56827394e.zip
org.eclipse.riena-3c922fff52af4c952a2fb1f7d013f3b56827394e.tar.gz
org.eclipse.riena-3c922fff52af4c952a2fb1f7d013f3b56827394e.tar.bz2
write time of logging if logging event has no time
-rw-r--r--org.eclipse.riena.core/src/org/eclipse/riena/core/logging/SysoLogListener.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.riena.core/src/org/eclipse/riena/core/logging/SysoLogListener.java b/org.eclipse.riena.core/src/org/eclipse/riena/core/logging/SysoLogListener.java
index 16e5a9f..a6e1cd1 100644
--- a/org.eclipse.riena.core/src/org/eclipse/riena/core/logging/SysoLogListener.java
+++ b/org.eclipse.riena.core/src/org/eclipse/riena/core/logging/SysoLogListener.java
@@ -22,7 +22,12 @@ public class SysoLogListener implements LogListener {
public void logged(LogEntry entry) {
ExtendedLogEntry eEntry = (ExtendedLogEntry) entry;
StringBuffer buffer = new StringBuffer();
- buffer.append(new Date(eEntry.getTime()).toString()).append(' ');
+ long time = eEntry.getTime();
+ if (time == 0) {
+ buffer.append(new Date().toString()).append(' ');
+ } else {
+ buffer.append(new Date(eEntry.getTime()).toString()).append(' ');
+ }
String level;
switch (eEntry.getLevel()) {
case LogService.LOG_DEBUG:
@@ -42,6 +47,7 @@ public class SysoLogListener implements LogListener {
break;
}
buffer.append(level).append(' ');
+ buffer.append("[Thread-" + eEntry.getThreadID() + "] ");
buffer.append(eEntry.getLoggerName()).append(' ');
if (eEntry.getContext() != null) {
buffer.append(eEntry.getContext()).append(' ');