[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v0.9.18-111-g8d16d53

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Tue Mar 23 16:17:55 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  8d16d5325738f9816f3a191208ccf54cbeaffd3f (commit)
      from  e6af6bd2f69de46eed5febf9bb0de8613469a713 (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=8d16d5325738f9816f3a191208ccf54cbeaffd3f
http://github.com/ceki/logback/commit/8d16d5325738f9816f3a191208ccf54cbeaffd3f

commit 8d16d5325738f9816f3a191208ccf54cbeaffd3f
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Tue Mar 23 16:16:47 2010 +0100

    - DBAppender tests pass with MySQL

diff --git a/logback-classic/pom.xml b/logback-classic/pom.xml
index 9db2104..477d694 100644
--- a/logback-classic/pom.xml
+++ b/logback-classic/pom.xml
@@ -94,6 +94,13 @@
     </dependency>
 
     <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+      <version>5.1.9</version>
+      <scope>test</scope>      
+    </dependency>
+
+    <dependency>
       <groupId>javax.mail</groupId>
       <artifactId>mail</artifactId>
       <scope>compile</scope>
@@ -309,13 +316,6 @@ org.slf4j.test_osgi
       <id>host-orion</id>
 
       <dependencies>
-        <dependency>
-          <groupId>mysql</groupId>
-          <artifactId>mysql-connector-java</artifactId>
-          <version>5.0.8</version>
-          <scope>test</scope>
-        </dependency>
-
         <!-- locally installed artifact -->
         <dependency>
           <groupId>com.microsoft.sqlserver</groupId>
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/mysql.sql b/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/mysql.sql
index bc9dabe..e8c2fb3 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/mysql.sql
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/mysql.sql
@@ -1,51 +1,51 @@
 # This SQL script creates the required tables by ch.qos.logback.classic.db.DBAppender.
 #
-# It is intended for MySQL databases. It has been tested on MySQL 5.0.22 with 
-# INNODB tables.
+# It is intended for MySQL databases. It has been tested on MySQL 5.1.37 
+# on Linux
 
 
 BEGIN;
-DROP TABLE IF EXISTS logging_event_property;
-DROP TABLE IF EXISTS logging_event_exception;
-DROP TABLE IF EXISTS logging_event;
+DROP TABLE IF EXISTS LOGGING_EVENT_PROPERTY;
+DROP TABLE IF EXISTS LOGGING_EVENT_EXCEPTION;
+DROP TABLE IF EXISTS LOGGING_EVENT;
 COMMIT;
 
 
 BEGIN;
-CREATE TABLE logging_event 
+CREATE TABLE LOGGING_EVENT 
   (
-    timestmp         BIGINT NOT NULL,
-   	formatted_message  TEXT NOT NULL,
-    logger_name       VARCHAR(254) NOT NULL,
-    level_string      VARCHAR(254) NOT NULL,
-    thread_name       VARCHAR(254),
-    reference_flag    SMALLINT,
-    caller_filename   VARCHAR(254) NOT NULL,
-    caller_class      VARCHAR(254) NOT NULL,
-    caller_method     VARCHAR(254) NOT NULL,
-    caller_line       CHAR(4) NOT NULL,
-    event_id          INT NOT NULL AUTO_INCREMENT PRIMARY KEY
+    TIMESTMP         BIGINT NOT NULL,
+    FORMATTED_MESSAGE  TEXT NOT NULL,
+    LOGGER_NAME       VARCHAR(254) NOT NULL,
+    LEVEL_STRING      VARCHAR(254) NOT NULL,
+    THREAD_NAME       VARCHAR(254),
+    REFERENCE_FLAG    SMALLINT,
+    CALLER_FILENAME   VARCHAR(254) NOT NULL,
+    CALLER_CLASS      VARCHAR(254) NOT NULL,
+    CALLER_METHOD     VARCHAR(254) NOT NULL,
+    CALLER_LINE       CHAR(4) NOT NULL,
+    EVENT_ID          INT NOT NULL AUTO_INCREMENT PRIMARY KEY
   );
 COMMIT;
 
 BEGIN;
-CREATE TABLE logging_event_property
+CREATE TABLE LOGGING_EVENT_PROPERTY
   (
-    event_id	      INT NOT NULL,
-    mapped_key        VARCHAR(254) NOT NULL,
-    mapped_value      TEXT,
-    PRIMARY KEY(event_id, mapped_key),
-    FOREIGN KEY (event_id) REFERENCES logging_event(event_id)
+    EVENT_ID	      INT NOT NULL,
+    MAPPED_KEY        VARCHAR(254) NOT NULL,
+    MAPPED_VALUE      TEXT,
+    PRIMARY KEY(EVENT_ID, MAPPED_KEY),
+    FOREIGN KEY (EVENT_ID) REFERENCES LOGGING_EVENT(EVENT_ID)
   );
 COMMIT;
 
 BEGIN;
-CREATE TABLE logging_event_exception
+CREATE TABLE LOGGING_EVENT_EXCEPTION
   (
-    event_id         INT NOT NULL,
-    i                SMALLINT NOT NULL,
-    trace_line       VARCHAR(254) NOT NULL,
-    PRIMARY KEY(event_id, i),
-    FOREIGN KEY (event_id) REFERENCES logging_event(event_id)
+    EVENT_ID         INT NOT NULL,
+    I                SMALLINT NOT NULL,
+    TRACE_LINE       VARCHAR(254) NOT NULL,
+    PRIMARY KEY(EVENT_ID, I),
+    FOREIGN KEY (EVENT_ID) REFERENCES LOGGING_EVENT(EVENT_ID)
   );
 COMMIT;
\ No newline at end of file
diff --git a/logback-classic/src/test/input/integration/db/mysql-with-driver.xml b/logback-classic/src/test/input/integration/db/mysql-with-driver.xml
index 1f42bac..557554f 100644
--- a/logback-classic/src/test/input/integration/db/mysql-with-driver.xml
+++ b/logback-classic/src/test/input/integration/db/mysql-with-driver.xml
@@ -2,17 +2,17 @@
 
 <configuration>
 
-	<appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
-		<connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
-			<driverClass>com.mysql.jdbc.Driver</driverClass>
-			<url>jdbc:mysql://localhost:3306/logback</url>
-			<user>root</user>
-			<password></password>
-		</connectionSource>
-	</appender>
-	
-	<root>
-		<level value="debug" />
-		<appender-ref ref="DB" />
-	</root>
+  <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
+    <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
+      <driverClass>com.mysql.jdbc.Driver</driverClass>
+      <url>jdbc:mysql://127.0.0.1:3306/test</url>
+      <user>test</user>
+      <password>test</password>
+    </connectionSource>
+  </appender>
+  
+  <root>
+    <level value="debug" />
+    <appender-ref ref="DB" />
+  </root>
 </configuration>
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/db/DBAppenderIntegrationTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/db/DBAppenderIntegrationTest.java
index e146669..341d135 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/db/DBAppenderIntegrationTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/DBAppenderIntegrationTest.java
@@ -39,6 +39,7 @@ public class DBAppenderIntegrationTest {
   static String LOCAL_HOST_NAME;
   static String[] CONFORMING_HOST_LIST = new String[] { "Orion" };
   static String[] POSTGRES_CONFORMING_HOST_LIST = new String[] { "haro" };
+  static String[] MYSQL_CONFORMING_HOST_LIST = new String[] { "haro" };
 
   int diff = new Random(System.nanoTime()).nextInt(10000);
   LoggerContext lc = new LoggerContext();
@@ -80,7 +81,6 @@ public class DBAppenderIntegrationTest {
     Exception e = new Exception("Just testing", getCause());
     logger
         .error("At last an error.", e);
-    e.printStackTrace();
     // check that there were no errors
     StatusPrinter.print(lc);
     assertEquals(Status.INFO, lc.getStatusManager().getLevel());
@@ -139,7 +139,7 @@ public class DBAppenderIntegrationTest {
   @Test
   public void mysql() throws Exception {
     // perform test only on conforming hosts
-    if (!isConformingHostAndJDK16OrHigher()) {
+    if (!isConformingHostAndJDK16OrHigher(MYSQL_CONFORMING_HOST_LIST)) {
       return;
     }
     doTest("src/test/input/integration/db/mysql-with-driver.xml");
diff --git a/pom.xml b/pom.xml
index f56f9ec..56ce38e 100755
--- a/pom.xml
+++ b/pom.xml
@@ -104,6 +104,13 @@
         <version>8.4-701.jdbc4</version>
       </dependency> 
       <dependency>
+        <groupId>mysql</groupId>
+        <artifactId>mysql-connector-java</artifactId>
+        <version>5.1.9</version>
+      </dependency>
+
+
+      <dependency>
         <groupId>org.apache.tomcat</groupId>
         <artifactId>catalina</artifactId>
         <version>6.0.20</version>

-----------------------------------------------------------------------

Summary of changes:
 logback-classic/pom.xml                            |   14 +++---
 .../ch/qos/logback/classic/db/dialect/mysql.sql    |   58 ++++++++++----------
 .../input/integration/db/mysql-with-driver.xml     |   26 +++++-----
 .../classic/db/DBAppenderIntegrationTest.java      |    4 +-
 pom.xml                                            |    7 +++
 5 files changed, 58 insertions(+), 51 deletions(-)


hooks/post-receive
-- 
Logback: the generic, reliable, fast and flexible logging framework.


More information about the logback-dev mailing list