[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v0.9.18-55-ge7d7288
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Wed Mar 3 17:17:50 CET 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Logback: the generic, reliable, fast and flexible logging framework.".
The branch, master has been updated
via e7d72885a2d1592597f70ae927812d9064b474bd (commit)
from 83516636bda43c43594d34e39f428f82ebeb1a18 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=e7d72885a2d1592597f70ae927812d9064b474bd
http://github.com/ceki/logback/commit/e7d72885a2d1592597f70ae927812d9064b474bd
commit e7d72885a2d1592597f70ae927812d9064b474bd
Author: Ceki Gulcu <ceki at qos.ch>
Date: Wed Mar 3 17:17:18 2010 +0100
Fixed LBCLASSIC-191
diff --git a/logback-classic/osgi-build.xml b/logback-classic/osgi-build.xml
index 0e56c0b..615452d 100644
--- a/logback-classic/osgi-build.xml
+++ b/logback-classic/osgi-build.xml
@@ -1,6 +1,10 @@
<project name="osgi-test" default="testAll">
<!--
+ This build file is intended for testing purposes. It does not
+ actually package or create any files with a lifespan beyond that
+ of the current test cycle.
+
This build file is usually run indirectly via Maven.
When running this build file through Ant directly, you must
@@ -9,6 +13,9 @@
ant -DcurrentVersion=1.5.4-SNAPSHOT
-->
+ <!-- We skip the test if the maven.test.skip system property is set
+ to true. See also http://jira.qos.ch/browse/LBCLASSIC-191 -->
+
<echo message="compile classpath: ${currentVersion}" />
<echo message="test classpath: ${test_classpath}" />
<echo message="basedir: ${basedir}" />
@@ -39,7 +46,7 @@
<mkdir dir="target/unit-reports" />
</target>
- <target name="createIBundle">
+ <target name="createIBundle" unless="maven.test.skip">
<mkdir dir="${bundlesDir}"/>
<jar destFile="${iBundleJar}"
manifest="src/IBUNDLE-META-INF/MANIFEST.MF"
@@ -48,7 +55,7 @@
</target>
- <target name="testAll" depends="init, createIBundle, logback">
+ <target name="testAll" depends="init, createIBundle, logback" unless="maven.test.skip">
</target>
@@ -71,8 +78,7 @@
invoked from the parent dir, which messes up theses tests. Hence, the
fork="yes" dir="${basedir}" -->
-
- <target name="logback">
+ <target name="logback" unless="maven.test.skip">
<prepareOSGiHarness binding="logback"/>
<junit printsummary="yes" fork="yes" dir="${basedir}" haltonfailure="yes">
<classpath path="${test_classpath}"/>
diff --git a/logback-core/src/main/java/ch/qos/logback/core/encoder/Encoder.java b/logback-core/src/main/java/ch/qos/logback/core/encoder/Encoder.java
index 821db3d..42a46d9 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/encoder/Encoder.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/encoder/Encoder.java
@@ -20,8 +20,8 @@ import ch.qos.logback.core.spi.ContextAware;
import ch.qos.logback.core.spi.LifeCycle;
public interface Encoder<E> extends ContextAware, LifeCycle {
-
- void doEncode(E event) throws IOException;
+
void init(OutputStream os) throws IOException;
+ void doEncode(E event) throws IOException;
void close() throws IOException;
}
diff --git a/logback-examples/src/main/java/chapters/appenders/IOPerformance.java b/logback-examples/src/main/java/chapters/appenders/IOPerformance.java
index 8804bcb..d74ddb7 100644
--- a/logback-examples/src/main/java/chapters/appenders/IOPerformance.java
+++ b/logback-examples/src/main/java/chapters/appenders/IOPerformance.java
@@ -57,9 +57,9 @@ public class IOPerformance extends Thread {
fa.setAppend(true);
fa.setContext(context);
fa.start();
-
- ((ch.qos.logback.classic.Logger)logger).addAppender(fa);
-
+
+ ((ch.qos.logback.classic.Logger) logger).addAppender(fa);
+
StatusPrinter.print(context);
}
@@ -80,7 +80,6 @@ public class IOPerformance extends Thread {
// Second test with no immediate flushing
perfCase(false, l);
-
// There is no fourth test as buffered IO and immediate flushing
// do not make sense.
}
@@ -95,8 +94,7 @@ public class IOPerformance extends Thread {
System.exit(1);
}
- static void perfCase(boolean immediateFlush, long len)
- throws Exception {
+ static void perfCase(boolean immediateFlush, long len) throws Exception {
IOPerformance[] threads = new IOPerformance[NUM_THREADS];
OtherIO otherIOThread = new OtherIO();
otherIOThread.start();
@@ -123,7 +121,7 @@ public class IOPerformance extends Thread {
otherIOThread.interrupted = true;
otherIOThread.join();
- System.out.println("On total throughput of " + (sum)
+ System.out.println("On total throughput of " + (sum)
+ " logs per microsecond.");
System.out.println("------------------------------------------------");
}
@@ -136,7 +134,7 @@ public class IOPerformance extends Thread {
logger.debug(MSG);
}
- throughput = (len * 1.0) / ((System.nanoTime() - before)/1000);
+ throughput = (len * 1.0) / ((System.nanoTime() - before) / 1000);
System.out.println(getName() + ", immediateFlush: " + immediateFlush
+ ", throughput: " + throughput + " logs per microsecond.");
}
@@ -148,19 +146,14 @@ class OtherIO extends Thread {
public void run() {
long before = System.nanoTime();
-
try {
FileWriter fw = new FileWriter(IOPerformance.PARALLEL_FILE, true);
while (!interrupted) {
-// if (counter++ % 1000 == 0) {
-// Thread.yield();
-// }
counter++;
- fw.write("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
+ fw.write("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
fw.flush();
}
-
} catch (IOException e) {
e.printStackTrace();
}
-----------------------------------------------------------------------
Summary of changes:
logback-classic/osgi-build.xml | 14 +++++++++---
.../java/ch/qos/logback/core/encoder/Encoder.java | 4 +-
.../java/chapters/appenders/IOPerformance.java | 21 ++++++-------------
3 files changed, 19 insertions(+), 20 deletions(-)
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list