[logback-dev] svn commit: r864 - in logback/trunk: logback-classic/src/main/java/ch/qos/logback/classic/spi logback-core/src/main/java/ch/qos/logback/core/layout logback-core/src/test/java/ch/qos/logback/core/layout
noreply.seb at qos.ch
noreply.seb at qos.ch
Fri Nov 3 10:57:28 CET 2006
Author: seb
Date: Fri Nov 3 10:57:28 2006
New Revision: 864
Added:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/layout/
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/layout/EchoLayout.java
- copied, changed from r863, /logback/trunk/logback-core/src/test/java/ch/qos/logback/core/layout/EchoLayout.java
Removed:
logback/trunk/logback-core/src/test/java/ch/qos/logback/core/layout/EchoLayout.java
Modified:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggingEvent.java
Log:
moved EchoLayout to core classes, and implemented a simple toString() on LoggingEvent.
This allows any event to decide the way it should look and any component to use the
same layout for that purpose.
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggingEvent.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggingEvent.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggingEvent.java Fri Nov 3 10:57:28 2006
@@ -283,5 +283,14 @@
int levelInt = in.readInt();
level = Level.toLevel(levelInt);
}
+
+ @Override
+ public String toString() {
+ StringBuffer sb = new StringBuffer('[');
+ sb.append(level).append("] ");
+ sb.append(getFormattedMessage());
+ sb.append("\n");
+ return sb.toString();
+ }
}
Copied: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/layout/EchoLayout.java (from r863, /logback/trunk/logback-core/src/test/java/ch/qos/logback/core/layout/EchoLayout.java)
==============================================================================
--- /logback/trunk/logback-core/src/test/java/ch/qos/logback/core/layout/EchoLayout.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/layout/EchoLayout.java Fri Nov 3 10:57:28 2006
@@ -1,5 +1,5 @@
/**
- * LOGBack: the generic, reliable, fast and flexible logging framework.
+ * Logback: the reliable, generic, fast and flexible logging framework.
*
* Copyright (C) 1999-2006, QOS.ch
*
More information about the logback-dev
mailing list