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

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Mon Mar 22 21:45:17 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  1903ec955f2575cdad61fa9a2df6ac20b4ac3638 (commit)
      from  901a3a19b1f89939a2fed00c2cdc5ebd8c8bec77 (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=1903ec955f2575cdad61fa9a2df6ac20b4ac3638
http://github.com/ceki/logback/commit/1903ec955f2575cdad61fa9a2df6ac20b4ac3638

commit 1903ec955f2575cdad61fa9a2df6ac20b4ac3638
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Mon Mar 22 21:44:27 2010 +0100

    - added H2 and Sybase support

diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/h2.sql b/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/h2.sql
new file mode 100644
index 0000000..0ba314d
--- /dev/null
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/h2.sql
@@ -0,0 +1,35 @@
+# This SQL script creates the required tables by ch.qos.logback.classic.db.DBAppender.
+#
+# It is intended for HSQL databases. It has been tested on HSQL 1.8.07.
+
+DROP TABLE logging_event_exception IF EXISTS;
+DROP TABLE logging_event_property IF EXISTS;
+DROP TABLE logging_event IF EXISTS;
+
+CREATE TABLE logging_event (
+  timestmp BIGINT NOT NULL,
+  formatted_message LONGVARCHAR NOT NULL,
+  logger_name VARCHAR(256) NOT NULL,
+  level_string VARCHAR(256) NOT NULL,
+  thread_name VARCHAR(256),
+  reference_flag SMALLINT,
+  caller_filename VARCHAR(256), 
+  caller_class VARCHAR(256), 
+  caller_method VARCHAR(256), 
+  caller_line CHAR(4),
+  event_id INT NOT NULL IDENTITY);
+
+
+CREATE TABLE logging_event_property (
+  event_id INT NOT NULL,
+  mapped_key  VARCHAR(254) NOT NULL,
+  mapped_value LONGVARCHAR,
+  PRIMARY KEY(event_id, mapped_key),
+  FOREIGN KEY (event_id) REFERENCES logging_event(event_id));
+
+CREATE TABLE logging_event_exception (
+  event_id INT NOT NULL,
+  i SMALLINT NOT NULL,
+  trace_line VARCHAR(256) NOT NULL,
+  PRIMARY KEY(event_id, i),
+  FOREIGN KEY (event_id) REFERENCES logging_event(event_id)); 
\ No newline at end of file
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/sybaseSqlAnywhere.sql b/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/sybaseSqlAnywhere.sql
new file mode 100644
index 0000000..4daa77d
--- /dev/null
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/sybaseSqlAnywhere.sql
@@ -0,0 +1,38 @@
+-- This SQL script creates the required tables by ch.qos.logback.classic.db.DBAppender
+-- for Sybase SQLAnywhere.  Tested on SQLAnywhere 10.0.1.
+
+DROP TABLE logging_event_property 
+DROP TABLE logging_event_exception 
+DROP TABLE logging_event 
+
+CREATE TABLE logging_event 
+( 
+timestmp         bigint NOT NULL,
+formatted_message  LONG VARCHAR 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       varCHAR(4) NOT NULL,
+event_id          int NOT NULL DEFAULT AUTOINCREMENT,
+PRIMARY KEY(event_id) 
+) 			
+
+CREATE TABLE logging_event_property 
+  ( 
+	event_id          int NOT NULL REFERENCES logging_event(event_id), 
+	mapped_key        VARCHAR(254) NOT NULL, 
+	mapped_value      LONG VARCHAR, 
+	PRIMARY KEY(event_id, mapped_key) 
+  ) 
+
+CREATE TABLE logging_event_exception 
+  ( 
+	event_id         int NOT NULL REFERENCES logging_event(event_id) , 
+	i                SMALLINT NOT NULL, 
+	trace_line       VARCHAR(254) NOT NULL, 
+	PRIMARY KEY(event_id, i) 
+  )
diff --git a/logback-core/src/main/java/ch/qos/logback/core/db/dialect/H2Dialect.java b/logback-core/src/main/java/ch/qos/logback/core/db/dialect/H2Dialect.java
new file mode 100644
index 0000000..3e9c0f3
--- /dev/null
+++ b/logback-core/src/main/java/ch/qos/logback/core/db/dialect/H2Dialect.java
@@ -0,0 +1,28 @@
+/**
+ * Logback: the reliable, generic, fast and flexible logging framework.
+ * Copyright (C) 1999-2009, 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.core.db.dialect;
+
+/**
+ * The HSQLDB dialect.
+ * 
+ * @author Ceki G&uuml;lc&uuml;
+ */
+public class H2Dialect implements SQLDialect {
+  public static final String SELECT_CURRVAL = "CALL IDENTITY()";
+
+  public String getSelectInsertId() {
+    return SELECT_CURRVAL;
+  }
+  
+}
diff --git a/logback-core/src/main/java/ch/qos/logback/core/db/dialect/SybaseSqlAnywhereDialect.java b/logback-core/src/main/java/ch/qos/logback/core/db/dialect/SybaseSqlAnywhereDialect.java
new file mode 100644
index 0000000..6768e25
--- /dev/null
+++ b/logback-core/src/main/java/ch/qos/logback/core/db/dialect/SybaseSqlAnywhereDialect.java
@@ -0,0 +1,34 @@
+/**
+ * Logback: the reliable, generic, fast and flexible logging framework.
+ * Copyright (C) 1999-2009, 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.core.db.dialect;
+
+public class SybaseSqlAnywhereDialect implements SQLDialect {
+
+  /** 
+  * The Sybase SQLAnywhere Dialect 
+  * 
+  * Note that the dialect is not needed if your JDBC driver supports 
+  * the getGeneratedKeys method introduced in JDBC 3.0 specification.
+  * 
+  * @author Michael Lynch 
+  */ 
+
+  public static final String SELECT_CURRVAL = "SELECT @@identity id";
+
+  public String getSelectInsertId() {
+    return SELECT_CURRVAL;
+  }
+
+}

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

Summary of changes:
 .../classic/db/dialect/{hsqldb.sql => h2.sql}      |    2 +-
 .../classic/db/dialect/sybaseSqlAnywhere.sql       |   38 ++++++++++++++++++++
 .../dialect/{HSQLDBDialect.java => H2Dialect.java} |    2 +-
 ...BDialect.java => SybaseSqlAnywhereDialect.java} |   22 +++++++----
 4 files changed, 54 insertions(+), 10 deletions(-)
 copy logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/{hsqldb.sql => h2.sql} (94%)
 create mode 100644 logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/sybaseSqlAnywhere.sql
 copy logback-core/src/main/java/ch/qos/logback/core/db/dialect/{HSQLDBDialect.java => H2Dialect.java} (93%)
 copy logback-core/src/main/java/ch/qos/logback/core/db/dialect/{HSQLDBDialect.java => SybaseSqlAnywhereDialect.java} (61%)


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


More information about the logback-dev mailing list