[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v_0.9.21-7-g459e776
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Mon Jun 14 21:27:42 CEST 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 459e776d0ad4954ca36ee26210339ccf61f96f96 (commit)
from c641f97153aecc6791e95cad237ae8706f28102e (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=459e776d0ad4954ca36ee26210339ccf61f96f96
http://github.com/ceki/logback/commit/459e776d0ad4954ca36ee26210339ccf61f96f96
commit 459e776d0ad4954ca36ee26210339ccf61f96f96
Author: Ceki Gulcu <ceki at qos.ch>
Date: Mon Jun 14 21:23:17 2010 +0200
- upgraded to ant-plugin version 1.4
- simplified logback-classic/osgi-build.xml
- added logback-classic/integration.xml in order to test initialization without groovy.jar on the classpath
diff --git a/logback-classic/integration.xml b/logback-classic/integration.xml
new file mode 100644
index 0000000..a8a5b3a
--- /dev/null
+++ b/logback-classic/integration.xml
@@ -0,0 +1,41 @@
+<project name="integration" default="testAll" basedir=".">
+
+ <!--
+ This build file is usually run indirectly via Maven.
+
+ When running this build file through Ant directly, you must
+ define the slf4jVersion property on the command line, e.g.:
+
+ ant -Dslf4jVersion=1.5.4-SNAPSHOT
+ -->
+
+ <echo message="slf4j.version: ${slf4j.version}" />
+
+ <path id="basicClasspath">
+ <pathelement location="../logback-core/target/classes/" />
+ <pathelement location="../logback-core/target/test-classes/" />
+ <pathelement location="./target/classes/" />
+ <pathelement location="./target/test-classes/" />
+ <pathelement location="./lib/slf4j-api-${slf4j.version}.jar" />
+ <pathelement location="./src/test/input/integration/autoInit/" />
+ </path >
+
+
+
+
+ <target name="testAll" depends="testWithoutGroovy">
+ </target>
+
+
+
+ <target name="testWithoutGroovy">
+ <junit printsummary="yes" fork="no" haltonfailure="yes">
+ <classpath refid="basicClasspath" />
+ <formatter type="plain" />
+ <test fork="yes" todir="target/unit-reports"
+ outfile="TEST-NoGroovy"
+ name="ch.qos.logback.classic.util.InitializationIntegrationTest" />
+ </junit>
+ </target>
+
+</project>
\ No newline at end of file
diff --git a/logback-classic/osgi-build.xml b/logback-classic/osgi-build.xml
index 045578f..f3586d0 100644
--- a/logback-classic/osgi-build.xml
+++ b/logback-classic/osgi-build.xml
@@ -18,28 +18,39 @@
<echo message="compile classpath: ${currentVersion}" />
<echo message="test classpath: ${test_classpath}" />
- <echo message="basedir: ${basedir}" />
+
+
<property name="iBundleJar" value="target/iBundle.jar"/>
<property name="bundlesDir" value="bundle"/>
- <!-- this is really very ugly, but it's the only way to circumvent
- http://jira.codehaus.org/browse/MANTRUN-95
- -->
- <taskdef name="junit" classpath="${test_classpath}"
- classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" />
+ <echo message="===============================" />
+ <echo message="basedir: ${basedir}" />
+ <echo message="===============================" />
+
+ <path id="basicCP">
+ <pathelement location="${org.apache.felix:org.apache.felix.main:jar}" />
+ <pathelement location="target/classes/" />
+ <pathelement location="target/test-classes" />
+ <!--
+ <pathelement location="${org.slf4j:slf4j-api:jar}" />
+ <pathelement location="../logback-core/target/classes/" />
+ <pathelement location="../logback-core/target/test-classes/" />
+ -->
+ </path >
+
<path id="minimal">
<pathelement location="target/test-classes/" />
</path >
<target name="copySLF4J_JAR">
- <echo>Copying ${slf4jJAR} to lib/</echo>
+ <echo>Copying ${org.slf4j:slf4j-api:jar} to lib/</echo>
<delete>
<fileset dir="../logback-examples/lib/" includes="slf4j-*SNAPSHOT.jar" />
</delete>
- <copy file="${slf4jJAR}" todir="lib/" />
+ <copy file="${org.slf4j:slf4j-api:jar}" todir="lib/" />
</target>
<target name="init" depends="copySLF4J_JAR">
@@ -80,8 +91,8 @@
<target name="logback" unless="maven.test.skip">
<prepareOSGiHarness binding="logback"/>
- <junit printsummary="yes" fork="yes" dir="${basedir}" haltonfailure="yes">
- <classpath path="${test_classpath}"/>
+ <junit printsummary="yes" fork="yes" dir="${basedir}" haltonfailure="yes">
+ <classpath refid="basicCP"/>
<formatter type="plain" />
<test fork="yes" todir="target/unit-reports" name="org.slf4j.test_osgi.BundleTest" />
</junit>
diff --git a/logback-classic/pom.xml b/logback-classic/pom.xml
index 884a78a..2d0ba69 100644
--- a/logback-classic/pom.xml
+++ b/logback-classic/pom.xml
@@ -247,30 +247,29 @@
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.2</version>
+ <version>1.4</version>
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-junit</artifactId>
+ <version>1.8.1</version>
</dependency>
<dependency>
- <groupId>ant</groupId>
- <artifactId>ant-junit</artifactId>
- <version>1.6.5</version>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
</dependency>
+
</dependencies>
+
<executions>
<execution>
<id>ant-osgi-test</id>
<phase>package</phase>
<configuration>
<tasks>
- <property name="currentVersion" value="${version}" />
+ <property name="currentVersion" value="${version}" />
<property name="slf4j.version" value="${slf4j.version}"/>
- <property name="test_classpath" refid="maven.test.classpath"/>
- <property name="slf4jJAR"
- value="${settings.localRepository}/org/slf4j/slf4j-api/${slf4j.version}/slf4j-api-${slf4j.version}.jar" />
<property name="basedir" value="${basedir}"/>
<ant antfile="${basedir}/osgi-build.xml"/>
</tasks>
@@ -280,6 +279,21 @@
</goals>
</execution>
+ <execution>
+ <id>ant-integration-test</id>
+ <phase>package</phase>
+
+
+ <configuration>
+ <tasks>
+ <property name="slf4j.version" value="${slf4j.version}"/>
+ <ant antfile="${basedir}/integration.xml"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
</executions>
</plugin>
@@ -292,11 +306,12 @@
<reportFormat>plain</reportFormat>
<trimStackTrace>false</trimStackTrace>
<excludes>
+ <exclude>**/*.java</exclude>
<exclude>**/AllClassicTest.java</exclude>
<exclude>**/PackageTest.java</exclude>
<exclude>**/TestConstants.java</exclude>
<exclude>**/test_osgi/BundleTest.java</exclude>
-org.slf4j.test_osgi
+ <exclude>**/ch/qos/logback/classic/util/InitializationIntegrationTest.java</exclude>
<exclude>**/SerializationPerfTest.java</exclude>
</excludes>
</configuration>
diff --git a/logback-classic/src/main/groovy/ch/qos/logback/classic/sift/GSiftingAppender.groovy b/logback-classic/src/main/groovy/ch/qos/logback/classic/sift/GSiftingAppender.groovy
index f2493e7..b995c0c 100644
--- a/logback-classic/src/main/groovy/ch/qos/logback/classic/sift/GSiftingAppender.groovy
+++ b/logback-classic/src/main/groovy/ch/qos/logback/classic/sift/GSiftingAppender.groovy
@@ -27,7 +27,9 @@ import ch.qos.logback.core.helpers.NOPAppender
/**
* @author Ceki Gücü
*/
-class GSiftingAppender extends AppenderBase<ILoggingEvent> implements ConfigurationContributor {
+
+// The GMaven plugin does not support generics, so we use AppenderBase instead of AppenderBase<ILoggingEvent>
+class GSiftingAppender extends AppenderBase implements ConfigurationContributor {
protected AppenderTracker<ILoggingEvent> appenderTracker = new AppenderTrackerImpl<ILoggingEvent>();
@@ -87,7 +89,8 @@ class GSiftingAppender extends AppenderBase<ILoggingEvent> implements Configurat
}
@Override
- protected void append(ILoggingEvent event) {
+ public void append(Object object) {
+ ILoggingEvent event = (ILoggingEvent) object;
if (!isStarted()) {
return;
}
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java b/logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java
index 48682da..0927830 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java
@@ -65,10 +65,8 @@ public class ContextInitializer {
gafferConfigurator.run(url);
} else {
StatusManager sm = loggerContext.getStatusManager();
- if (url == null) {
- sm.add(new ErrorStatus("Groovy classes are not available on the class path. Aborting initialization.",
- loggerContext));
- }
+ sm.add(new ErrorStatus("Groovy classes are not available on the class path. ABORTING INITIALIZATION.",
+ loggerContext));
}
}
if (url.toString().endsWith("xml")) {
diff --git a/logback-classic/src/test/input/integration/autoInit/logback.xml b/logback-classic/src/test/input/integration/autoInit/logback.xml
new file mode 100644
index 0000000..ddeb399
--- /dev/null
+++ b/logback-classic/src/test/input/integration/autoInit/logback.xml
@@ -0,0 +1,8 @@
+
+<configuration>
+
+ <appender name="LIST" class="ch.qos.logback.core.read.ListAppender"/>
+ <root level="DEBUG">
+ <appender-ref ref="LIST" />
+ </root>
+</configuration>
\ No newline at end of file
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/util/ContextInitializerTest.java
similarity index 95%
rename from logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationTest.java
rename to logback-classic/src/test/java/ch/qos/logback/classic/util/ContextInitializerTest.java
index b6852a7..9e76963 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/util/ContextInitializerTest.java
@@ -21,8 +21,6 @@ import static org.junit.Assert.assertEquals;
import java.util.List;
-import ch.qos.logback.core.util.OptionHelper;
-import ch.qos.logback.core.util.StatusPrinter;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
@@ -39,9 +37,9 @@ import ch.qos.logback.core.joran.spi.JoranException;
import ch.qos.logback.core.status.StatusListener;
import ch.qos.logback.core.status.TrivialStatusListener;
-public class InitializationTest {
+public class ContextInitializerTest {
- org.slf4j.Logger logger = LoggerFactory.getLogger(InitializationTest.class);
+ org.slf4j.Logger logger = LoggerFactory.getLogger(ContextInitializerTest.class);
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
Logger root = (Logger) LoggerFactory.getLogger("root");
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationIntegrationTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationIntegrationTest.java
new file mode 100644
index 0000000..be1d81f
--- /dev/null
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationIntegrationTest.java
@@ -0,0 +1,42 @@
+/**
+ * Logback: the reliable, generic, fast and flexible logging framework.
+ * Copyright (C) 1999-2010, QOS.ch. All rights reserved.
+ *
+ * This program and the accompanying materials are dual-licensed under
+ * either the terms of the Eclipse Public License v1.0 as published by
+ * the Eclipse Foundation
+ *
+ * or (per the licensee's choosing)
+ *
+ * under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation.
+ */
+package ch.qos.logback.classic.util;
+
+import ch.qos.logback.classic.Logger;
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.core.read.ListAppender;
+import ch.qos.logback.core.util.StatusPrinter;
+import org.junit.Test;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * @author Ceki Gücü
+ */
+public class InitializationIntegrationTest {
+
+
+
+ @Test
+ public void smoke() {
+ Logger logger = (Logger) LoggerFactory.getLogger(this.getClass());
+ Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
+ //StatusPrinter.print((LoggerContext)LoggerFactory.getILoggerFactory());
+ ListAppender la = (ListAppender) root.getAppender("LIST");
+ assertNotNull(la);
+ }
+
+
+}
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/util/PackageTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/util/PackageTest.java
index 0256b5a..6d9ce5c 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/util/PackageTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/util/PackageTest.java
@@ -19,7 +19,7 @@ import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
- at SuiteClasses({InitializationTest.class, LogbackMDCAdapterTest.class, LevelToSyslogSeverityTest.class} )
+ at SuiteClasses({ContextInitializerTest.class, LogbackMDCAdapterTest.class, LevelToSyslogSeverityTest.class} )
public class PackageTest {
}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index b77610a..de0b57e 100755
--- a/pom.xml
+++ b/pom.xml
@@ -17,7 +17,9 @@
<url>http://www.qos.ch</url>
</organization>
<inceptionYear>2005</inceptionYear>
-
+
+
+
<modules>
<module>logback-core</module>
<module>logback-classic</module>
@@ -26,11 +28,20 @@
<module>logback-examples</module>
</modules>
+ <properties>
+ <!-- slf4j.version property is used below, in
+ logback-classic/pom.xml and in setClasspath.cmd -->
+ <slf4j.version>1.6.0</slf4j.version>
+ <junit.version>4.7</junit.version>
+
+ <consolePlugin.version>1.1.0</consolePlugin.version>
+ </properties>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.7</version>
+ <version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -41,13 +52,7 @@
</dependency>
</dependencies>
- <properties>
- <!-- slf4j.version property is used below, in
- logback-classic/pom.xml and in setClasspath.cmd -->
- <slf4j.version>1.6.0</slf4j.version>
- <consolePlugin.version>1.1.0</consolePlugin.version>
- </properties>
-
+
<dependencyManagement>
<dependencies>
<!-- Project modules -->
-----------------------------------------------------------------------
Summary of changes:
logback-classic/integration.xml | 41 +++++++++++++++++++
logback-classic/osgi-build.xml | 31 ++++++++++-----
logback-classic/pom.xml | 39 +++++++++++++------
.../logback/classic/sift/GSiftingAppender.groovy | 7 ++-
.../logback/classic/util/ContextInitializer.java | 6 +--
.../test/input/integration/autoInit/logback.xml | 8 ++++
...zationTest.java => ContextInitializerTest.java} | 6 +--
.../util/InitializationIntegrationTest.java | 42 ++++++++++++++++++++
.../ch/qos/logback/classic/util/PackageTest.java | 2 +-
pom.xml | 23 +++++++----
10 files changed, 163 insertions(+), 42 deletions(-)
create mode 100644 logback-classic/integration.xml
create mode 100644 logback-classic/src/test/input/integration/autoInit/logback.xml
rename logback-classic/src/test/java/ch/qos/logback/classic/util/{InitializationTest.java => ContextInitializerTest.java} (95%)
create mode 100644 logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationIntegrationTest.java
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list