[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. release_0.9.19-30-ga3423c5

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Wed Mar 31 17:51:59 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  a3423c5ec6e11b19562964017bbcd15e34980e09 (commit)
       via  4abcfc3f85f0d26ae4ba72b6201f2466157997bf (commit)
       via  a8ab965ec25bd74d99673a1f70748814b61eec02 (commit)
       via  99aec4afc70c32ab2c896541fb23587eac133d5c (commit)
       via  48b7a18ac1c3aad68d969f7074265524348b7360 (commit)
       via  569f138e5747e97715c3cd21a4e60187539f3cd2 (commit)
       via  2f15b38b16cef98708af85b4c238e20884fc8f51 (commit)
       via  dc2438ed69e0a56e9ecb4e87ef29ef142ad5557b (commit)
       via  0851bedca5864da9bd729793393dfcb47417292e (commit)
       via  80fb8ac10abdf2db8aafb05e8899660879d2ebd4 (commit)
       via  a9d4721dbca8c77e5b005bca28f15f1757873b74 (commit)
       via  e804e15654e6b911de4d771f2b3a88a405233d42 (commit)
       via  97af7f3deb4f81e0877f5c5076d477010725dfef (commit)
       via  bf77adca9403f83b2dbaa849ce08000d4a06eaf8 (commit)
      from  ddd1b6a3c18099ba49d07e83be26a40a64116924 (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=a3423c5ec6e11b19562964017bbcd15e34980e09
http://github.com/ceki/logback/commit/a3423c5ec6e11b19562964017bbcd15e34980e09

commit a3423c5ec6e11b19562964017bbcd15e34980e09
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Wed Mar 31 17:46:47 2010 +0200

    - Removed bogus System.out statement in DBAppenderBase
    
    - Merged from http://github.com/nurkiewicz/logback with following changes:
    
    * removed CustomDBNameResolver as joran currently does not support
    setters with two arguments
    
    *  Omitted bogus modifications in FileAppenderResilienceTest and
    IncludeActionTest
    
    - fest-assert added as a common test dependency

diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java
deleted file mode 100644
index 373f4aa..0000000
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.db.names;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Allows to override any table or column name to arbitrary value.
- *
- * @author Tomasz Nurkiewicz
- * @author Ceki Gulcu
- * @since 0.9.19
- */
-public class CustomDBNameResolver implements DBNameResolver {
-
-  private final DBNameResolver defaultDbNameResolver = new DefaultDBNameResolver();
-  private final Map<String, String> tableNameOverrides = new HashMap<String, String>();
-  private final Map<String, String> columnNameOverrides = new HashMap<String, String>();
-  
-  public <N extends Enum<?>> String getTableName(N tableName) {
-    if (tableNameOverrides.get(tableName.name()) != null)
-      return tableNameOverrides.get(tableName.name());
-    return defaultDbNameResolver.getTableName(tableName);
-  }
-
-  public <N extends Enum<?>> String getColumnName(N columnName) {
-    if (columnNameOverrides.get(columnName.name()) != null)
-      return columnNameOverrides.get(columnName.name());
-    return defaultDbNameResolver.getColumnName(columnName);
-  }
-
-  public void overrideTableName(String reference, String name) {
-    tableNameOverrides.put(reference, name);
-  }
-  public void overrideColumnName(String reference, String name) {
-    columnNameOverrides.put(reference, name);
-  }
-
-  public <N extends Enum<?>> void overrideTableName(N referenceTableName, String name) {
-    tableNameOverrides.put(referenceTableName.name(), name);
-  }
-  public <N extends Enum<?>> void overrideColumnName(N referenceColumnName, String name) {
-    columnNameOverrides.put(referenceColumnName.name(), name);
-  }
-
-}
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/db/PackageTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/db/PackageTest.java
index 5c90451..f2af6d6 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/db/PackageTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/PackageTest.java
@@ -19,6 +19,7 @@ import org.junit.runners.Suite.SuiteClasses;
 
 @RunWith(Suite.class)
 @SuiteClasses( { DBAppenderHSQLTest.class, DBAppenderH2Test.class,
-    DBAppenderIntegrationTest.class })
+    DBAppenderIntegrationTest.class, SQLBuilderTest.class,
+    ch.qos.logback.classic.db.names.PackageTest.class})
 public class PackageTest {
 }
\ No newline at end of file
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
index 1894e5d..c03a67a 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
@@ -1,9 +1,12 @@
 package ch.qos.logback.classic.db;
 
-import ch.qos.logback.classic.db.names.*;
+import static org.fest.assertions.Assertions.assertThat;
+
 import org.junit.Test;
 
-import static org.fest.assertions.Assertions.assertThat;
+import ch.qos.logback.classic.db.names.DBNameResolver;
+import ch.qos.logback.classic.db.names.DefaultDBNameResolver;
+import ch.qos.logback.classic.db.names.SimpleDBNameResolver;
 
 /**
  * @author Tomasz Nurkiewicz
@@ -50,74 +53,6 @@ public class SQLBuilderTest {
     assertThat(sql).isEqualTo(expected);
   }
 
-  @Test
-  public void shouldReturnCustomSqlInsertLoggingEventQuery() throws Exception {
-    //given
-    DBNameResolver nameResolver = createCustomDBNameResolver();
-
-    //when
-    String sql = SQLBuilder.buildInsertSQL(nameResolver);
-
-    //then
-    final String expected = "INSERT INTO alpha (a, b, c, d, e, f, a0, a1, a2, a3, g, h, i, j) VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
-    assertThat(sql).isEqualTo(expected);
-  }
-
-  private DBNameResolver createCustomDBNameResolver() {
-    final CustomDBNameResolver nameResolver = new CustomDBNameResolver();
-    nameResolver.overrideTableName(TableName.LOGGING_EVENT, "alpha");
-    nameResolver.overrideTableName(TableName.LOGGING_EVENT_EXCEPTION.name(), "beta");
-    nameResolver.overrideTableName(TableName.LOGGING_EVENT_PROPERTY, "gamma");
-
-    nameResolver.overrideColumnName(ColumnName.TIMESTMP, "a");
-    nameResolver.overrideColumnName(ColumnName.FORMATTED_MESSAGE, "b");
-    nameResolver.overrideColumnName(ColumnName.LOGGER_NAME, "c");
-    nameResolver.overrideColumnName(ColumnName.LEVEL_STRING, "d");
-    nameResolver.overrideColumnName(ColumnName.THREAD_NAME, "e");
-    nameResolver.overrideColumnName(ColumnName.REFERENCE_FLAG, "f");
-    nameResolver.overrideColumnName(ColumnName.ARG0.name(), "a0");
-    nameResolver.overrideColumnName(ColumnName.ARG1.name(), "a1");
-    nameResolver.overrideColumnName(ColumnName.ARG2.name(), "a2");
-    nameResolver.overrideColumnName(ColumnName.ARG3.name(), "a3");
-    nameResolver.overrideColumnName(ColumnName.CALLER_FILENAME.name(), "g");
-    nameResolver.overrideColumnName(ColumnName.CALLER_CLASS.name(), "h");
-    nameResolver.overrideColumnName(ColumnName.CALLER_METHOD.name(), "i");
-    nameResolver.overrideColumnName(ColumnName.CALLER_LINE.name(), "j");
-
-    nameResolver.overrideColumnName(ColumnName.EVENT_ID.name(), "k");
-    nameResolver.overrideColumnName(ColumnName.I.name(), "l");
-    nameResolver.overrideColumnName(ColumnName.TRACE_LINE.name(), "m");
-
-    nameResolver.overrideColumnName(ColumnName.MAPPED_KEY.name(), "o");
-    nameResolver.overrideColumnName(ColumnName.MAPPED_VALUE.name(), "p");
-    return nameResolver;
-  }
-
-  @Test
-  public void shouldReturnCustomSqlInsertExceptionQuery() throws Exception {
-    //given
-    DBNameResolver nameResolver = createCustomDBNameResolver();
-
-    //when
-    String sql = SQLBuilder.buildInsertExceptionSQL(nameResolver);
-
-    //then
-    final String expected = "INSERT INTO beta (k, l, m) VALUES (?, ?, ?)";
-    assertThat(sql).isEqualTo(expected);
-  }
-
-  @Test
-  public void shouldReturnCustomSqlInsertLoggingPropertyQuery() throws Exception {
-    //given
-    DBNameResolver nameResolver = createCustomDBNameResolver();
-
-    //when
-    String sql = SQLBuilder.buildInsertPropertiesSQL(nameResolver);
-
-    //then
-    final String expected = "INSERT INTO gamma (k, o, p) VALUES (?, ?, ?)";
-    assertThat(sql).isEqualTo(expected);
-  }
 
   private DBNameResolver createSimpleDBNameResolver() {
     final SimpleDBNameResolver nameResolver = new SimpleDBNameResolver();
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/db/names/CustomDBNameResolverTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/CustomDBNameResolverTest.java
deleted file mode 100644
index 0720db0..0000000
--- a/logback-classic/src/test/java/ch/qos/logback/classic/db/names/CustomDBNameResolverTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package ch.qos.logback.classic.db.names;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.fest.assertions.Assertions.assertThat;
-
-/**
- * @author Tomasz Nurkiewicz
- * @since 2010-03-18
- */
-public class CustomDBNameResolverTest {
-  private CustomDBNameResolver resolver;
-
-  @Before
-  public void setUp() throws Exception {
-    resolver = new CustomDBNameResolver();
-  }
-
-  @Test
-  public void shouldReturnDefaultTableName() throws Exception {
-    //when
-    String tableName = resolver.getTableName(TableName.LOGGING_EVENT);
-
-    //then
-    assertThat(tableName).isEqualTo("logging_event");
-  }
-
-  @Test
-  public void shouldReturnDefaultLoggingEventColumnName() throws Exception {
-    //when
-    String columnName = resolver.getColumnName(ColumnName.LOGGER_NAME);
-
-    //then
-    assertThat(columnName).isEqualTo("logger_name");
-  }
-
-  @Test
-  public void shouldReturnDefaultLoggingPropertyColumnName() throws Exception {
-    //when
-    String columnName = resolver.getColumnName(ColumnName.MAPPED_VALUE);
-
-    //then
-    assertThat(columnName).isEqualTo("mapped_value");
-  }
-
-  @Test
-  public void shouldReturnDefaultLoggingExceptionColumnName() throws Exception {
-    //when
-    String columnName = resolver.getColumnName(ColumnName.EVENT_ID);
-
-    //then
-    assertThat(columnName).isEqualTo("event_id");
-  }
-
-  @Test
-  public void shouldReturnModifiedTableName() throws Exception {
-    //when
-  resolver.overrideTableName(TableName.LOGGING_EVENT_EXCEPTION.name(), "tbl_logging_event_exception");
-    String tableName = resolver.getTableName(TableName.LOGGING_EVENT_EXCEPTION);
-
-    //then
-    assertThat(tableName).isEqualTo("tbl_logging_event_exception");
-  }
-
-  @Test
-  public void shouldReturnModifiedColumnName() throws Exception {
-    //when
-    resolver.overrideColumnName(ColumnName.CALLER_FILENAME.name(), "c_caller_filename");
-    String columnName = resolver.getColumnName(ColumnName.CALLER_FILENAME);
-
-    //then
-    assertThat(columnName).isEqualTo("c_caller_filename");
-  }
-
-  @Test
-  public void shouldReturnModifiedLoggingPropertyColumnName() throws Exception {
-    //when
-    resolver.overrideColumnName(ColumnName.MAPPED_KEY.name(), "c_mapped_key");
-    String columnName = resolver.getColumnName(ColumnName.MAPPED_KEY);
-
-    //then
-    assertThat(columnName).isEqualTo("c_mapped_key");
-  }
-
-  @Test
-  public void shouldReturnModifiedLoggingExceptionColumnName() throws Exception {
-    //when
-    resolver.overrideColumnName(ColumnName.I.name(), "c_i");
-    String columnName = resolver.getColumnName(ColumnName.I);
-
-    //then
-    assertThat(columnName).isEqualTo("c_i");
-  }
-
-  @Test
-  public void shouldReturnDefaultTableNameWhenNullGiven() throws Exception {
-    //when
-    resolver.overrideColumnName(TableName.LOGGING_EVENT_EXCEPTION.name(), null);
-    String tableName = resolver.getTableName(TableName.LOGGING_EVENT_PROPERTY);
-
-    //then
-    assertThat(tableName).isEqualTo("logging_event_property");
-  }
-
-  @Test
-  public void shouldReturnDefaultColumnNameWhenNullGiven() throws Exception {
-    //when
-    resolver.overrideColumnName(ColumnName.CALLER_CLASS.name(), null);
-    String columnName = resolver.getColumnName(ColumnName.CALLER_CLASS);
-
-    //then
-    assertThat(columnName).isEqualTo("caller_class");
-  }
-
-  @Test
-  public void shouldReturnDefaultLoggingPropertyColumnNameWhenNullGiven() throws Exception {
-    //when
-    resolver.overrideColumnName(ColumnName.EVENT_ID.name(), null);
-    String columnName = resolver.getColumnName(ColumnName.EVENT_ID);
-
-    //then
-    assertThat(columnName).isEqualTo("event_id");
-  }
-
-  @Test
-  public void shouldReturnDefaultLoggingExceptionColumnNameWhenNullGiven() throws Exception {
-    //when
-    resolver.overrideColumnName(ColumnName.I.name(), null);
-    String columnName = resolver.getColumnName(ColumnName.I);
-
-    //then
-    assertThat(columnName).isEqualTo("i");
-  }
-
-}
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/db/PackageTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/PackageTest.java
similarity index 81%
copy from logback-classic/src/test/java/ch/qos/logback/classic/db/PackageTest.java
copy to logback-classic/src/test/java/ch/qos/logback/classic/db/names/PackageTest.java
index 5c90451..60a57b1 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/db/PackageTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/PackageTest.java
@@ -11,14 +11,14 @@
  * 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.db;
+package ch.qos.logback.classic.db.names;
 
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
 
 @RunWith(Suite.class)
- at SuiteClasses( { DBAppenderHSQLTest.class, DBAppenderH2Test.class,
-    DBAppenderIntegrationTest.class })
+ at SuiteClasses( { DefaultDBNameResolverTest.class,
+    SimpleDBNameResolverTest.class })
 public class PackageTest {
 }
\ No newline at end of file
diff --git a/logback-core/src/main/java/ch/qos/logback/core/db/DBAppenderBase.java b/logback-core/src/main/java/ch/qos/logback/core/db/DBAppenderBase.java
index de7d6ad..d958df4 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/db/DBAppenderBase.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/db/DBAppenderBase.java
@@ -108,7 +108,6 @@ public abstract class DBAppenderBase<E> extends UnsynchronizedAppenderBase<E> {
         subAppend(eventObject, connection, insertStatement);
         eventId = selectEventId(insertStatement, connection);
       }
-      System.out.println("eventid="+eventId);
       secondarySubAppend(eventObject, connection, eventId);
 
       // we no longer need the insertStatement
diff --git a/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java b/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java
index 0c83df6..99a6698 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java
@@ -46,6 +46,7 @@ public class FileAppenderResilienceTest {
   }
 
   @Test
+  @Ignore
   public void manual() throws InterruptedException, IOException {
     Runner runner = new Runner(fa);
     Thread t = new Thread(runner);
diff --git a/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java b/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
index 4b82b1a..1f31383 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
@@ -29,7 +29,6 @@ import java.util.Stack;
 
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.xml.sax.SAXParseException;
 
diff --git a/pom.xml b/pom.xml
index 4096a2e..a773645 100755
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.4</version>
+      <version>4.7</version>
       <scope>test</scope>
     </dependency>
     <dependency>

http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=4abcfc3f85f0d26ae4ba72b6201f2466157997bf
http://github.com/ceki/logback/commit/4abcfc3f85f0d26ae4ba72b6201f2466157997bf

commit 4abcfc3f85f0d26ae4ba72b6201f2466157997bf
Merge: ddd1b6a a8ab965
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Wed Mar 31 16:43:46 2010 +0200

    Merge git://github.com/nurkiewicz/logback into thomasz20100331


http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=a8ab965ec25bd74d99673a1f70748814b61eec02
http://github.com/ceki/logback/commit/a8ab965ec25bd74d99673a1f70748814b61eec02

commit a8ab965ec25bd74d99673a1f70748814b61eec02
Author: Tomasz Nurkiewicz <nurkiewicz at gmail.com>
Date:   Sun Mar 28 20:27:51 2010 +0200

    [LBCLASSIC-188] Short Javadocs with @since

diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java
index e4da258..373f4aa 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java
@@ -17,8 +17,11 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
+ * Allows to override any table or column name to arbitrary value.
+ *
  * @author Tomasz Nurkiewicz
- * @since 2010-03-16
+ * @author Ceki Gulcu
+ * @since 0.9.19
  */
 public class CustomDBNameResolver implements DBNameResolver {
 
@@ -52,7 +55,4 @@ public class CustomDBNameResolver implements DBNameResolver {
     columnNameOverrides.put(referenceColumnName.name(), name);
   }
 
-
-  
-
 }
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
index 7361e68..10f73f2 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
@@ -1,9 +1,10 @@
 package ch.qos.logback.classic.db.names;
 
 /**
- * TODO: Handle null prefixes/suffixes somehow
+ * Adds custom prefix/suffix to table and column names.
+ *
  * @author Tomasz Nurkiewicz
- * @since 2010-03-19
+ * @since 0.9.20
  */
 public class SimpleDBNameResolver implements DBNameResolver {
 
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/TableName.java b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/TableName.java
index 9995361..7c6cf00 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/TableName.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/TableName.java
@@ -2,7 +2,7 @@ package ch.qos.logback.classic.db.names;
 
 /**
  * @author Tomasz Nurkiewicz
- * @since 2010-03-15
+ * @since 0.9.19
  */
 public enum TableName {
 

http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=99aec4afc70c32ab2c896541fb23587eac133d5c
http://github.com/ceki/logback/commit/99aec4afc70c32ab2c896541fb23587eac133d5c

commit 99aec4afc70c32ab2c896541fb23587eac133d5c
Author: Tomasz Nurkiewicz <nurkiewicz at gmail.com>
Date:   Sun Mar 28 20:04:16 2010 +0200

    Revert mistakenly commited @Ignore

diff --git a/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java b/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java
index 5a3463c..0c83df6 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java
@@ -17,7 +17,6 @@ import ch.qos.logback.core.testUtil.RandomUtil;
 import ch.qos.logback.core.util.CoreTestConstants;
 import ch.qos.logback.core.util.ResilienceUtil;
 
- at Ignore
 public class FileAppenderResilienceTest {
 
   FileAppender<Object> fa = new FileAppender<Object>();
diff --git a/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java b/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
index e7d2ffe..4c56b65 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
@@ -173,7 +173,6 @@ public class IncludeActionTest {
   }
 
   @Test
-  @Ignore
   public void unknownURL() throws JoranException {
     System.setProperty(INCLUDE_KEY, "http://logback2345.qos.ch");
     tc.doConfigure(TOP_BY_URL);

http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=48b7a18ac1c3aad68d969f7074265524348b7360
http://github.com/ceki/logback/commit/48b7a18ac1c3aad68d969f7074265524348b7360

commit 48b7a18ac1c3aad68d969f7074265524348b7360
Merge: 569f138 39d30d0
Author: Tomasz Nurkiewicz <nurkiewicz at gmail.com>
Date:   Sun Mar 28 19:45:36 2010 +0200

    Merge branch 'master' of git://github.com/ceki/logback

diff --cc logback-classic/src/main/java/ch/qos/logback/classic/db/SQLBuilder.java
index 7c724aa,8ebeece..489de51
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/SQLBuilder.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/SQLBuilder.java
@@@ -11,9 -24,9 +24,9 @@@ public class SQLBuilder 
    static String buildInsertPropertiesSQL(DBNameResolver dbNameResolver) {
      StringBuilder sqlBuilder = new StringBuilder("INSERT INTO ");
      sqlBuilder.append(dbNameResolver.getTableName(TableName.LOGGING_EVENT_PROPERTY)).append(" (");
-     sqlBuilder.append(dbNameResolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.EVENT_ID)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.MAPPED_KEY)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.MAPPED_VALUE)).append(") ");
 -    sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.EVENT_ID)).append(",");
 -    sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.MAPPED_KEY)).append(",");
++    sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.EVENT_ID)).append(", ");
++    sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.MAPPED_KEY)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.MAPPED_VALUE)).append(") ");
      sqlBuilder.append("VALUES (?, ?, ?)");
      return sqlBuilder.toString();
    }
@@@ -21,9 -34,9 +34,9 @@@
    static String buildInsertExceptionSQL(DBNameResolver dbNameResolver) {
      StringBuilder sqlBuilder = new StringBuilder("INSERT INTO ");
      sqlBuilder.append(dbNameResolver.getTableName(TableName.LOGGING_EVENT_EXCEPTION)).append(" (");
-     sqlBuilder.append(dbNameResolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.EVENT_ID)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.I)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.TRACE_LINE)).append(") ");
 -    sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.EVENT_ID)).append(",");
 -    sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.I)).append(",");
++    sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.EVENT_ID)).append(", ");
++    sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.I)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.TRACE_LINE)).append(") ");
      sqlBuilder.append("VALUES (?, ?, ?)");
      return sqlBuilder.toString();
    }
@@@ -31,17 -44,21 +44,21 @@@
    static String buildInsertSQL(DBNameResolver dbNameResolver) {
      StringBuilder sqlBuilder = new StringBuilder("INSERT INTO ");
      sqlBuilder.append(dbNameResolver.getTableName(TableName.LOGGING_EVENT)).append(" (");
-     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.TIMESTMP)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.FORMATTED_MESSAGE)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.LOGGER_NAME)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.LEVEL_STRING)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.REFERENCE_FLAG)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.CALLER_FILENAME)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.CALLER_CLASS)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.CALLER_METHOD)).append(", ");
-     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.CALLER_LINE)).append(") ");
-     sqlBuilder.append("VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?)");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.TIMESTMP)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.FORMATTED_MESSAGE)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.LOGGER_NAME)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.LEVEL_STRING)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.THREAD_NAME)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.REFERENCE_FLAG)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.ARG0)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.ARG1)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.ARG2)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.ARG3)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.CALLER_FILENAME)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.CALLER_CLASS)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.CALLER_METHOD)).append(", ");
+     sqlBuilder.append(dbNameResolver.getColumnName(ColumnName.CALLER_LINE)).append(") ");
 -    sqlBuilder.append(" VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
++    sqlBuilder.append("VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
      return sqlBuilder.toString();
    }
  }
diff --cc logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java
index b020d0f,e0578f9..e4da258
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java
@@@ -10,109 -23,30 +23,36 @@@ import java.util.Map
  public class CustomDBNameResolver implements DBNameResolver {
  
    private final DBNameResolver defaultDbNameResolver = new DefaultDBNameResolver();
-   private final Map<TableName, String> tableNameOverrides = new EnumMap<TableName, String>(TableName.class);
-   private final Map<LoggingEventColumnName, String> leColumnNameOverrides = new EnumMap<LoggingEventColumnName, String>(LoggingEventColumnName.class);
-   private final Map<LoggingEventPropertyColumnName, String> lePropertyColumnNameOverrides = new EnumMap<LoggingEventPropertyColumnName, String>(LoggingEventPropertyColumnName.class);
-   private final Map<LoggingEventExceptionColumnName, String> leExceptionColumnNameOverrides = new EnumMap<LoggingEventExceptionColumnName, String>(LoggingEventExceptionColumnName.class);
- 
-   public String getTableName(TableName tableName) {
-     if (tableNameOverrides.get(tableName) != null)
-       return tableNameOverrides.get(tableName);
+   private final Map<String, String> tableNameOverrides = new HashMap<String, String>();
+   private final Map<String, String> columnNameOverrides = new HashMap<String, String>();
+   
+   public <N extends Enum<?>> String getTableName(N tableName) {
 -    if (tableNameOverrides.get(tableName) != null)
 -      return tableNameOverrides.get(tableName);
++    if (tableNameOverrides.get(tableName.name()) != null)
++      return tableNameOverrides.get(tableName.name());
      return defaultDbNameResolver.getTableName(tableName);
    }
  
-   public String getLoggingEventColumnName(LoggingEventColumnName columnName) {
-     if (leColumnNameOverrides.get(columnName) != null)
-       return leColumnNameOverrides.get(columnName);
-     return defaultDbNameResolver.getLoggingEventColumnName(columnName);
-   }
- 
-   public String getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName columnName) {
-     if (lePropertyColumnNameOverrides.get(columnName) != null)
-       return lePropertyColumnNameOverrides.get(columnName);
-     return defaultDbNameResolver.getLoggingEventPropertyColumnName(columnName);
+   public <N extends Enum<?>> String getColumnName(N columnName) {
 -    if (columnNameOverrides.get(columnName) != null)
 -      return columnNameOverrides.get(columnName);
++    if (columnNameOverrides.get(columnName.name()) != null)
++      return columnNameOverrides.get(columnName.name());
+     return defaultDbNameResolver.getColumnName(columnName);
    }
 -  
 -  
 +
-   public String getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName columnName) {
-     if (leExceptionColumnNameOverrides.get(columnName) != null)
-       return leExceptionColumnNameOverrides.get(columnName);
-     return defaultDbNameResolver.getLoggingEventExceptionColumnName(columnName);
+   public void overrideTableName(String reference, String name) {
+     tableNameOverrides.put(reference, name);
    }
- 
-   public void setLoggingEventTableName(String tableName) {
-     tableNameOverrides.put(TableName.LOGGING_EVENT, tableName);
+   public void overrideColumnName(String reference, String name) {
+     columnNameOverrides.put(reference, name);
    }
  
-   public void setLoggingEventPropertyTableName(String tableName) {
-     tableNameOverrides.put(TableName.LOGGING_EVENT_PROPERTY, tableName);
++  public <N extends Enum<?>> void overrideTableName(N referenceTableName, String name) {
++    tableNameOverrides.put(referenceTableName.name(), name);
 +  }
- 
-   public void setLoggingEventExceptionTableName(String tableName) {
-     tableNameOverrides.put(TableName.LOGGING_EVENT_EXCEPTION, tableName);
++  public <N extends Enum<?>> void overrideColumnName(N referenceColumnName, String name) {
++    columnNameOverrides.put(referenceColumnName.name(), name);
 +  }
 +
-   public void setLoggingEventTimestmpColumnName(String columnName) {
-     leColumnNameOverrides.put(LoggingEventColumnName.TIMESTMP, columnName);
-   }
- 
-   public void setLoggingEventFormattedMessageColumnName(String columnName) {
-     leColumnNameOverrides.put(LoggingEventColumnName.FORMATTED_MESSAGE, columnName);
-   }
  
-   public void setLoggingEventLoggerNameColumnName(String columnName) {
-     leColumnNameOverrides.put(LoggingEventColumnName.LOGGER_NAME, columnName);
-   }
- 
-   public void setLoggingEventLevelStringColumnName(String columnName) {
-     leColumnNameOverrides.put(LoggingEventColumnName.LEVEL_STRING, columnName);
-   }
- 
-   public void setLoggingEventThreadNameColumnName(String columnName) {
-     leColumnNameOverrides.put(LoggingEventColumnName.THREAD_NAME, columnName);
-   }
- 
-   public void setLoggingEventReferenceFlagColumnName(String columnName) {
-     leColumnNameOverrides.put(LoggingEventColumnName.REFERENCE_FLAG, columnName);
-   }
- 
-   public void setLoggingEventCallerFilenameColumnName(String columnName) {
-     leColumnNameOverrides.put(LoggingEventColumnName.CALLER_FILENAME, columnName);
-   }
- 
-   public void setLoggingEventCallerClassColumnName(String columnName) {
-     leColumnNameOverrides.put(LoggingEventColumnName.CALLER_CLASS, columnName);
-   }
- 
-   public void setLoggingEventCallerMethodColumnName(String columnName) {
-     leColumnNameOverrides.put(LoggingEventColumnName.CALLER_METHOD, columnName);
-   }
- 
-   public void setLoggingEventCallerLineColumnName(String columnName) {
-     leColumnNameOverrides.put(LoggingEventColumnName.CALLER_LINE, columnName);
-   }
- 
-   public void setLoggingEventPropertyEventIdColumnName(String columnName) {
-     lePropertyColumnNameOverrides.put(LoggingEventPropertyColumnName.EVENT_ID, columnName);
-   }
- 
-   public void setLoggingEventPropertyMappedKeyColumnName(String columnName) {
-     lePropertyColumnNameOverrides.put(LoggingEventPropertyColumnName.MAPPED_KEY, columnName);
-   }
- 
-   public void setLoggingEventPropertyMappedValueColumnName(String columnName) {
-     lePropertyColumnNameOverrides.put(LoggingEventPropertyColumnName.MAPPED_VALUE, columnName);
-   }
- 
-   public void setLoggingEventExceptionEventIdColumnName(String columnName) {
-     leExceptionColumnNameOverrides.put(LoggingEventExceptionColumnName.EVENT_ID, columnName);
-   }
- 
-   public void setLoggingEventExceptionIColumnName(String columnName) {
-     leExceptionColumnNameOverrides.put(LoggingEventExceptionColumnName.I, columnName);
-   }
- 
-   public void setLoggingEventExceptionTraceLineColumnName(String columnName) {
-     leExceptionColumnNameOverrides.put(LoggingEventExceptionColumnName.TRACE_LINE, columnName);
-   }
+   
  
  }
diff --cc logback-classic/src/main/java/ch/qos/logback/classic/db/names/DBNameResolver.java
index 2647b00,e715fb5..672082d
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/DBNameResolver.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/DBNameResolver.java
@@@ -1,13 -1,20 +1,32 @@@
+ /**
+  * 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.db.names;
  
++/**
++ * Source of table and column names used in SQL queries generated by {@link ch.qos.logback.classic.db.DBAppender}
++ *
++ * Implement this interface to override default table and/or column names used by {@link ch.qos.logback.classic.db.DBAppender}.
++ *
++ * @author Tomasz Nurkiewicz
++ * @author Ceki Gulcu
++ * @since 0.9.19
++ * @see ch.qos.logback.classic.db.names.DefaultDBNameResolver
++ * @see ch.qos.logback.classic.db.names.CustomDBNameResolver
++ */
  public interface DBNameResolver {
  
-   String getTableName(TableName tableName);
- 
-   String getLoggingEventColumnName(LoggingEventColumnName columnName);
- 
-   String getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName columnName);
- 
-   String getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName columnName);
+   <N extends Enum<?>> String getTableName(N tableName);
 +
+   <N extends Enum<?>> String getColumnName(N columnName);
  }
diff --cc logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
index c30e929,0000000..7361e68
mode 100644,000000..100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
@@@ -1,46 -1,0 +1,41 @@@
 +package ch.qos.logback.classic.db.names;
 +
 +/**
 + * TODO: Handle null prefixes/suffixes somehow
 + * @author Tomasz Nurkiewicz
 + * @since 2010-03-19
 + */
 +public class SimpleDBNameResolver implements DBNameResolver {
 +
 +  private String tableNamePrefix = "";
++
 +  private String tableNameSuffix = "";
++
 +  private String columnNamePrefix = "";
++
 +  private String columnNameSuffix = "";
 +
-   public String getTableName(TableName tableName) {
++  public <N extends Enum<?>> String getTableName(N tableName) {
 +    return tableNamePrefix + tableName.name().toLowerCase() + tableNameSuffix;
 +  }
 +
-   public String getLoggingEventColumnName(LoggingEventColumnName columnName) {
-     return columnNamePrefix + columnName.name().toLowerCase() + columnNameSuffix;
-   }
- 
-   public String getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName columnName) {
-     return columnNamePrefix + columnName.name().toLowerCase() + columnNameSuffix;
-   }
- 
-   public String getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName columnName) {
++  public <N extends Enum<?>> String getColumnName(N columnName) {
 +    return columnNamePrefix + columnName.name().toLowerCase() + columnNameSuffix;
 +  }
 +
 +  public void setTableNamePrefix(String tableNamePrefix) {
 +    this.tableNamePrefix = tableNamePrefix != null? tableNamePrefix : "";
 +  }
 +
 +  public void setTableNameSuffix(String tableNameSuffix) {
 +    this.tableNameSuffix = tableNameSuffix != null? tableNameSuffix : "";
 +  }
 +
 +  public void setColumnNamePrefix(String columnNamePrefix) {
 +    this.columnNamePrefix = columnNamePrefix != null? columnNamePrefix : "";
 +  }
 +
 +  public void setColumnNameSuffix(String columnNameSuffix) {
 +    this.columnNameSuffix = columnNameSuffix != null? columnNameSuffix : "";
 +  }
 +}
diff --cc logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
index 72bc206,0000000..1894e5d
mode 100644,000000..100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
@@@ -1,170 -1,0 +1,170 @@@
 +package ch.qos.logback.classic.db;
 +
- import ch.qos.logback.classic.db.names.CustomDBNameResolver;
- import ch.qos.logback.classic.db.names.DBNameResolver;
- import ch.qos.logback.classic.db.names.DefaultDBNameResolver;
- import ch.qos.logback.classic.db.names.SimpleDBNameResolver;
++import ch.qos.logback.classic.db.names.*;
 +import org.junit.Test;
 +
 +import static org.fest.assertions.Assertions.assertThat;
 +
 +/**
 + * @author Tomasz Nurkiewicz
 + * @since 2010-03-22
 + */
 +public class SQLBuilderTest {
 +
 +  @Test
 +  public void shouldReturnDefaultSqlInsertLoggingEventQuery() throws Exception {
 +    //given
 +    DBNameResolver nameResolver = new DefaultDBNameResolver();
 +
 +    //when
 +    String sql = SQLBuilder.buildInsertSQL(nameResolver);
 +
 +    //then
-     final String expected = "INSERT INTO logging_event (timestmp, formatted_message, logger_name, level_string, thread_name, reference_flag, caller_filename, caller_class, caller_method, caller_line) VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?)";
++    final String expected = "INSERT INTO logging_event (timestmp, formatted_message, logger_name, level_string, thread_name, reference_flag, arg0, arg1, arg2, arg3, caller_filename, caller_class, caller_method, caller_line) VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
 +    assertThat(sql).isEqualTo(expected);
 +  }
 +
 +  @Test
 +  public void shouldReturnDefaultSqlInsertExceptionQuery() throws Exception {
 +    //given
 +    DBNameResolver nameResolver = new DefaultDBNameResolver();
 +
 +    //when
 +    String sql = SQLBuilder.buildInsertExceptionSQL(nameResolver);
 +
 +    //then
 +    final String expected = "INSERT INTO logging_event_exception (event_id, i, trace_line) VALUES (?, ?, ?)";
 +    assertThat(sql).isEqualTo(expected);
 +  }
 +
 +  @Test
 +  public void shouldReturnDefaultSqlInsertLoggingPropertyQuery() throws Exception {
 +    //given
 +    DBNameResolver nameResolver = new DefaultDBNameResolver();
 +
 +    //when
 +    String sql = SQLBuilder.buildInsertPropertiesSQL(nameResolver);
 +
 +    //then
 +    final String expected = "INSERT INTO logging_event_property (event_id, mapped_key, mapped_value) VALUES (?, ?, ?)";
 +    assertThat(sql).isEqualTo(expected);
 +  }
 +
 +  @Test
 +  public void shouldReturnCustomSqlInsertLoggingEventQuery() throws Exception {
 +    //given
 +    DBNameResolver nameResolver = createCustomDBNameResolver();
 +
 +    //when
 +    String sql = SQLBuilder.buildInsertSQL(nameResolver);
 +
 +    //then
-     final String expected = "INSERT INTO alpha (a, b, c, d, e, f, g, h, i, j) VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?)";
++    final String expected = "INSERT INTO alpha (a, b, c, d, e, f, a0, a1, a2, a3, g, h, i, j) VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
 +    assertThat(sql).isEqualTo(expected);
 +  }
 +
 +  private DBNameResolver createCustomDBNameResolver() {
 +    final CustomDBNameResolver nameResolver = new CustomDBNameResolver();
-     nameResolver.setLoggingEventTableName("alpha");
-     nameResolver.setLoggingEventExceptionTableName("beta");
-     nameResolver.setLoggingEventPropertyTableName("gamma");
- 
-     nameResolver.setLoggingEventTimestmpColumnName("a");
-     nameResolver.setLoggingEventFormattedMessageColumnName("b");
-     nameResolver.setLoggingEventLoggerNameColumnName("c");
-     nameResolver.setLoggingEventLevelStringColumnName("d");
-     nameResolver.setLoggingEventThreadNameColumnName("e");
-     nameResolver.setLoggingEventReferenceFlagColumnName("f");
-     nameResolver.setLoggingEventCallerFilenameColumnName("g");
-     nameResolver.setLoggingEventCallerClassColumnName("h");
-     nameResolver.setLoggingEventCallerMethodColumnName("i");
-     nameResolver.setLoggingEventCallerLineColumnName("j");
- 
-     nameResolver.setLoggingEventExceptionEventIdColumnName("k");
-     nameResolver.setLoggingEventExceptionIColumnName("l");
-     nameResolver.setLoggingEventExceptionTraceLineColumnName("m");
- 
-     nameResolver.setLoggingEventPropertyEventIdColumnName("n");
-     nameResolver.setLoggingEventPropertyMappedKeyColumnName("o");
-     nameResolver.setLoggingEventPropertyMappedValueColumnName("p");
++    nameResolver.overrideTableName(TableName.LOGGING_EVENT, "alpha");
++    nameResolver.overrideTableName(TableName.LOGGING_EVENT_EXCEPTION.name(), "beta");
++    nameResolver.overrideTableName(TableName.LOGGING_EVENT_PROPERTY, "gamma");
++
++    nameResolver.overrideColumnName(ColumnName.TIMESTMP, "a");
++    nameResolver.overrideColumnName(ColumnName.FORMATTED_MESSAGE, "b");
++    nameResolver.overrideColumnName(ColumnName.LOGGER_NAME, "c");
++    nameResolver.overrideColumnName(ColumnName.LEVEL_STRING, "d");
++    nameResolver.overrideColumnName(ColumnName.THREAD_NAME, "e");
++    nameResolver.overrideColumnName(ColumnName.REFERENCE_FLAG, "f");
++    nameResolver.overrideColumnName(ColumnName.ARG0.name(), "a0");
++    nameResolver.overrideColumnName(ColumnName.ARG1.name(), "a1");
++    nameResolver.overrideColumnName(ColumnName.ARG2.name(), "a2");
++    nameResolver.overrideColumnName(ColumnName.ARG3.name(), "a3");
++    nameResolver.overrideColumnName(ColumnName.CALLER_FILENAME.name(), "g");
++    nameResolver.overrideColumnName(ColumnName.CALLER_CLASS.name(), "h");
++    nameResolver.overrideColumnName(ColumnName.CALLER_METHOD.name(), "i");
++    nameResolver.overrideColumnName(ColumnName.CALLER_LINE.name(), "j");
++
++    nameResolver.overrideColumnName(ColumnName.EVENT_ID.name(), "k");
++    nameResolver.overrideColumnName(ColumnName.I.name(), "l");
++    nameResolver.overrideColumnName(ColumnName.TRACE_LINE.name(), "m");
++
++    nameResolver.overrideColumnName(ColumnName.MAPPED_KEY.name(), "o");
++    nameResolver.overrideColumnName(ColumnName.MAPPED_VALUE.name(), "p");
 +    return nameResolver;
 +  }
 +
 +  @Test
 +  public void shouldReturnCustomSqlInsertExceptionQuery() throws Exception {
 +    //given
 +    DBNameResolver nameResolver = createCustomDBNameResolver();
 +
 +    //when
 +    String sql = SQLBuilder.buildInsertExceptionSQL(nameResolver);
 +
 +    //then
 +    final String expected = "INSERT INTO beta (k, l, m) VALUES (?, ?, ?)";
 +    assertThat(sql).isEqualTo(expected);
 +  }
 +
 +  @Test
 +  public void shouldReturnCustomSqlInsertLoggingPropertyQuery() throws Exception {
 +    //given
 +    DBNameResolver nameResolver = createCustomDBNameResolver();
 +
 +    //when
 +    String sql = SQLBuilder.buildInsertPropertiesSQL(nameResolver);
 +
 +    //then
-     final String expected = "INSERT INTO gamma (n, o, p) VALUES (?, ?, ?)";
++    final String expected = "INSERT INTO gamma (k, o, p) VALUES (?, ?, ?)";
 +    assertThat(sql).isEqualTo(expected);
 +  }
 +
 +  private DBNameResolver createSimpleDBNameResolver() {
 +    final SimpleDBNameResolver nameResolver = new SimpleDBNameResolver();
 +    nameResolver.setTableNamePrefix("tp_");
 +    nameResolver.setTableNameSuffix("_ts");
 +    nameResolver.setColumnNamePrefix("cp_");
 +    nameResolver.setColumnNameSuffix("_cs");
 +    return nameResolver;
 +  }
 +
 +  @Test
 +  public void shouldReturnSimpleSqlInsertLoggingEventQuery() throws Exception {
 +    //given
 +    DBNameResolver nameResolver = createSimpleDBNameResolver();
 +
 +    //when
 +    String sql = SQLBuilder.buildInsertSQL(nameResolver);
 +
 +    //then
-     final String expected = "INSERT INTO tp_logging_event_ts (cp_timestmp_cs, cp_formatted_message_cs, cp_logger_name_cs, cp_level_string_cs, cp_thread_name_cs, cp_reference_flag_cs, cp_caller_filename_cs, cp_caller_class_cs, cp_caller_method_cs, cp_caller_line_cs) VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?)";
++    final String expected = "INSERT INTO tp_logging_event_ts (cp_timestmp_cs, cp_formatted_message_cs, cp_logger_name_cs, cp_level_string_cs, cp_thread_name_cs, cp_reference_flag_cs, cp_arg0_cs, cp_arg1_cs, cp_arg2_cs, cp_arg3_cs, cp_caller_filename_cs, cp_caller_class_cs, cp_caller_method_cs, cp_caller_line_cs) VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
 +    assertThat(sql).isEqualTo(expected);
 +  }
 +
 +  @Test
 +  public void shouldReturnSimpleSqlInsertExceptionQuery() throws Exception {
 +    //given
 +    DBNameResolver nameResolver = createSimpleDBNameResolver();
 +
 +    //when
 +    String sql = SQLBuilder.buildInsertExceptionSQL(nameResolver);
 +
 +    //then
 +    final String expected = "INSERT INTO tp_logging_event_exception_ts (cp_event_id_cs, cp_i_cs, cp_trace_line_cs) VALUES (?, ?, ?)";
 +    assertThat(sql).isEqualTo(expected);
 +  }
 +
 +  @Test
 +  public void shouldReturnSimpleSqlInsertLoggingPropertyQuery() throws Exception {
 +    //given
 +    DBNameResolver nameResolver = createSimpleDBNameResolver();
 +
 +    //when
 +    String sql = SQLBuilder.buildInsertPropertiesSQL(nameResolver);
 +
 +    //then
 +    final String expected = "INSERT INTO tp_logging_event_property_ts (cp_event_id_cs, cp_mapped_key_cs, cp_mapped_value_cs) VALUES (?, ?, ?)";
 +    assertThat(sql).isEqualTo(expected);
 +  }
 +
 +}
diff --cc logback-classic/src/test/java/ch/qos/logback/classic/db/names/CustomDBNameResolverTest.java
index cde1417,0000000..0720db0
mode 100644,000000..100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/db/names/CustomDBNameResolverTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/CustomDBNameResolverTest.java
@@@ -1,136 -1,0 +1,136 @@@
 +package ch.qos.logback.classic.db.names;
 +
 +import org.junit.Before;
 +import org.junit.Test;
 +
 +import static org.fest.assertions.Assertions.assertThat;
 +
 +/**
 + * @author Tomasz Nurkiewicz
 + * @since 2010-03-18
 + */
 +public class CustomDBNameResolverTest {
 +  private CustomDBNameResolver resolver;
 +
 +  @Before
 +  public void setUp() throws Exception {
 +    resolver = new CustomDBNameResolver();
 +  }
 +
 +  @Test
 +  public void shouldReturnDefaultTableName() throws Exception {
 +    //when
 +    String tableName = resolver.getTableName(TableName.LOGGING_EVENT);
 +
 +    //then
 +    assertThat(tableName).isEqualTo("logging_event");
 +  }
 +
 +  @Test
 +  public void shouldReturnDefaultLoggingEventColumnName() throws Exception {
 +    //when
-     String columnName = resolver.getLoggingEventColumnName(LoggingEventColumnName.LOGGER_NAME);
++    String columnName = resolver.getColumnName(ColumnName.LOGGER_NAME);
 +
 +    //then
 +    assertThat(columnName).isEqualTo("logger_name");
 +  }
 +
 +  @Test
 +  public void shouldReturnDefaultLoggingPropertyColumnName() throws Exception {
 +    //when
-     String columnName = resolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.MAPPED_VALUE);
++    String columnName = resolver.getColumnName(ColumnName.MAPPED_VALUE);
 +
 +    //then
 +    assertThat(columnName).isEqualTo("mapped_value");
 +  }
 +
 +  @Test
 +  public void shouldReturnDefaultLoggingExceptionColumnName() throws Exception {
 +    //when
-     String columnName = resolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.EVENT_ID);
++    String columnName = resolver.getColumnName(ColumnName.EVENT_ID);
 +
 +    //then
 +    assertThat(columnName).isEqualTo("event_id");
 +  }
 +
 +  @Test
 +  public void shouldReturnModifiedTableName() throws Exception {
 +    //when
-     resolver.setLoggingEventExceptionTableName("tbl_logging_event_exception");
++  resolver.overrideTableName(TableName.LOGGING_EVENT_EXCEPTION.name(), "tbl_logging_event_exception");
 +    String tableName = resolver.getTableName(TableName.LOGGING_EVENT_EXCEPTION);
 +
 +    //then
 +    assertThat(tableName).isEqualTo("tbl_logging_event_exception");
 +  }
 +
 +  @Test
-   public void shouldReturnModifiedLoggingEventColumnName() throws Exception {
++  public void shouldReturnModifiedColumnName() throws Exception {
 +    //when
-     resolver.setLoggingEventCallerFilenameColumnName("c_caller_filename");
-     String columnName = resolver.getLoggingEventColumnName(LoggingEventColumnName.CALLER_FILENAME);
++    resolver.overrideColumnName(ColumnName.CALLER_FILENAME.name(), "c_caller_filename");
++    String columnName = resolver.getColumnName(ColumnName.CALLER_FILENAME);
 +
 +    //then
 +    assertThat(columnName).isEqualTo("c_caller_filename");
 +  }
 +
 +  @Test
 +  public void shouldReturnModifiedLoggingPropertyColumnName() throws Exception {
 +    //when
-     resolver.setLoggingEventPropertyMappedKeyColumnName("c_mapped_key");
-     String columnName = resolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.MAPPED_KEY);
++    resolver.overrideColumnName(ColumnName.MAPPED_KEY.name(), "c_mapped_key");
++    String columnName = resolver.getColumnName(ColumnName.MAPPED_KEY);
 +
 +    //then
 +    assertThat(columnName).isEqualTo("c_mapped_key");
 +  }
 +
 +  @Test
 +  public void shouldReturnModifiedLoggingExceptionColumnName() throws Exception {
 +    //when
-     resolver.setLoggingEventExceptionIColumnName("c_i");
-     String columnName = resolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.I);
++    resolver.overrideColumnName(ColumnName.I.name(), "c_i");
++    String columnName = resolver.getColumnName(ColumnName.I);
 +
 +    //then
 +    assertThat(columnName).isEqualTo("c_i");
 +  }
 +
 +  @Test
 +  public void shouldReturnDefaultTableNameWhenNullGiven() throws Exception {
 +    //when
-     resolver.setLoggingEventExceptionTableName(null);
++    resolver.overrideColumnName(TableName.LOGGING_EVENT_EXCEPTION.name(), null);
 +    String tableName = resolver.getTableName(TableName.LOGGING_EVENT_PROPERTY);
 +
 +    //then
 +    assertThat(tableName).isEqualTo("logging_event_property");
 +  }
 +
 +  @Test
-   public void shouldReturnDefaultLoggingEventColumnNameWhenNullGiven() throws Exception {
++  public void shouldReturnDefaultColumnNameWhenNullGiven() throws Exception {
 +    //when
-     resolver.setLoggingEventCallerFilenameColumnName(null);
-     String columnName = resolver.getLoggingEventColumnName(LoggingEventColumnName.CALLER_CLASS);
++    resolver.overrideColumnName(ColumnName.CALLER_CLASS.name(), null);
++    String columnName = resolver.getColumnName(ColumnName.CALLER_CLASS);
 +
 +    //then
 +    assertThat(columnName).isEqualTo("caller_class");
 +  }
 +
 +  @Test
 +  public void shouldReturnDefaultLoggingPropertyColumnNameWhenNullGiven() throws Exception {
 +    //when
-     resolver.setLoggingEventPropertyMappedKeyColumnName(null);
-     String columnName = resolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.EVENT_ID);
++    resolver.overrideColumnName(ColumnName.EVENT_ID.name(), null);
++    String columnName = resolver.getColumnName(ColumnName.EVENT_ID);
 +
 +    //then
 +    assertThat(columnName).isEqualTo("event_id");
 +  }
 +
 +  @Test
 +  public void shouldReturnDefaultLoggingExceptionColumnNameWhenNullGiven() throws Exception {
 +    //when
-     resolver.setLoggingEventExceptionIColumnName(null);
-     String columnName = resolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.I);
++    resolver.overrideColumnName(ColumnName.I.name(), null);
++    String columnName = resolver.getColumnName(ColumnName.I);
 +
 +    //then
 +    assertThat(columnName).isEqualTo("i");
 +  }
 +
 +}
diff --cc logback-classic/src/test/java/ch/qos/logback/classic/db/names/DefaultDBNameResolverTest.java
index 6318da3,0000000..4a546fd
mode 100644,000000..100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/db/names/DefaultDBNameResolverTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/DefaultDBNameResolverTest.java
@@@ -1,57 -1,0 +1,57 @@@
 +package ch.qos.logback.classic.db.names;
 +
 +import org.junit.Before;
 +import org.junit.Test;
 +
 +import static org.fest.assertions.Assertions.assertThat;
 +
 +/**
 + * @author Tomasz Nurkiewicz
 + * @since 2010-03-18
 + */
 +public class DefaultDBNameResolverTest {
 +
 +  private DefaultDBNameResolver resolver;
 +
 +  @Before
 +  public void setUp() throws Exception {
 +    resolver = new DefaultDBNameResolver();
 +  }
 +
 +  @Test
 +  public void testGetLoggingEventColumnName() throws Exception {
 +    //when
-     String columnName = resolver.getLoggingEventColumnName(LoggingEventColumnName.LOGGER_NAME);
++    String columnName = resolver.getColumnName(ColumnName.LOGGER_NAME);
 +
 +    //then
 +    assertThat(columnName).isEqualTo("logger_name");
 +  }
 +
 +  @Test
 +  public void testGetLoggingEventPropertyColumnName() throws Exception {
 +    //when
-     String columnName = resolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.MAPPED_KEY);
++    String columnName = resolver.getColumnName(ColumnName.MAPPED_KEY);
 +
 +    //then
 +    assertThat(columnName).isEqualTo("mapped_key");
 +  }
 +
 +  @Test
 +  public void testGetLoggingEventExceptionColumnName() throws Exception {
 +    //when
-     String columnName = resolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.TRACE_LINE);
++    String columnName = resolver.getColumnName(ColumnName.TRACE_LINE);
 +
 +    //then
 +    assertThat(columnName).isEqualTo("trace_line");
 +  }
 +
 +  @Test
 +  public void testGetTableName() throws Exception {
 +    //when
 +    String tableName = resolver.getTableName(TableName.LOGGING_EVENT_EXCEPTION);
 +
 +    //then
 +    assertThat(tableName).isEqualTo("logging_event_exception");
 +  }
 +
 +}
diff --cc logback-classic/src/test/java/ch/qos/logback/classic/db/names/SimpleDBNameResolverTest.java
index d87c603,0000000..fd20ea9
mode 100644,000000..100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/db/names/SimpleDBNameResolverTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/SimpleDBNameResolverTest.java
@@@ -1,128 -1,0 +1,128 @@@
 +package ch.qos.logback.classic.db.names;
 +
 +import org.junit.Before;
 +import org.junit.Test;
 +
 +import static org.fest.assertions.Assertions.assertThat;
 +
 +/**
 + * @author Tomasz Nurkiewicz
 + * @since 2010-03-22
 + */
 +public class SimpleDBNameResolverTest {
 +
 +  private SimpleDBNameResolver nameResolver;
 +
 +  @Before
 +  public void setUp() throws Exception {
 +    nameResolver = new SimpleDBNameResolver();
 +    /*nameResolver.setTableNameSuffix("_ts");
 +    nameResolver.setColumnNamePrefix("cp_");
 +    nameResolver.setColumnNameSuffix("_cs");*/
 +  }
 +
 +  @Test
 +  public void shouldReturnTableNameWithPrefix() throws Exception {
 +    //given
 +
 +    //when
 +    nameResolver.setTableNamePrefix("tp_");
 +
 +    //then
 +    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("tp_logging_event");
-     assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("thread_name");
++    assertThat(nameResolver.getColumnName(ColumnName.THREAD_NAME)).isEqualTo("thread_name");
 +  }
 +
 +  @Test
 +  public void shouldReturnTableNameWithSuffix() throws Exception {
 +    //given
 +
 +    //when
 +    nameResolver.setTableNameSuffix("_ts");
 +
 +    //then
 +    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("logging_event_ts");
-     assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("thread_name");
++    assertThat(nameResolver.getColumnName(ColumnName.THREAD_NAME)).isEqualTo("thread_name");
 +  }
 +
 +  @Test
 +  public void shouldReturnTableNameWithBothPrefixAndSuffix() throws Exception {
 +    //given
 +
 +    //when
 +    nameResolver.setTableNamePrefix("tp_");
 +    nameResolver.setTableNameSuffix("_ts");
 +
 +    //then
 +    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("tp_logging_event_ts");
-     assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("thread_name");
++    assertThat(nameResolver.getColumnName(ColumnName.THREAD_NAME)).isEqualTo("thread_name");
 +  }
 +
 +  @Test
 +  public void shouldReturnColumnNameWithPrefix() throws Exception {
 +    //given
 +
 +    //when
 +    nameResolver.setColumnNamePrefix("cp_");
 +
 +    //then
 +    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("logging_event");
-     assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("cp_thread_name");
++    assertThat(nameResolver.getColumnName(ColumnName.THREAD_NAME)).isEqualTo("cp_thread_name");
 +  }
 +
 +  @Test
 +  public void shouldReturnColumnNameWithSuffix() throws Exception {
 +    //given
 +
 +    //when
 +    nameResolver.setColumnNameSuffix("_cs");
 +
 +    //then
 +    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("logging_event");
-     assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("thread_name_cs");
++    assertThat(nameResolver.getColumnName(ColumnName.THREAD_NAME)).isEqualTo("thread_name_cs");
 +  }
 +
 +  @Test
 +  public void shouldReturnColumnNameWithBothPrefixAndSuffix() throws Exception {
 +    //given
 +
 +    //when
 +    nameResolver.setColumnNamePrefix("cp_");
 +    nameResolver.setColumnNameSuffix("_cs");
 +
 +    //then
 +    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("logging_event");
-     assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("cp_thread_name_cs");
++    assertThat(nameResolver.getColumnName(ColumnName.THREAD_NAME)).isEqualTo("cp_thread_name_cs");
 +  }
 +
 +  @Test
 +  public void shouldReturnTableAndColumnNamesWithBothPrefixAndSuffix() throws Exception {
 +    //given
 +
 +    //when
 +    nameResolver.setTableNamePrefix("tp_");
 +    nameResolver.setTableNameSuffix("_ts");
 +    nameResolver.setColumnNamePrefix("cp_");
 +    nameResolver.setColumnNameSuffix("_cs");
 +
 +    //then
 +    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("tp_logging_event_ts");
-     assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("cp_thread_name_cs");
++    assertThat(nameResolver.getColumnName(ColumnName.THREAD_NAME)).isEqualTo("cp_thread_name_cs");
 +  }
 +
 +  @Test
 +  public void shouldHandleNullsAsEmptyStrings() throws Exception {
 +    //given
 +
 +    //when
 +    nameResolver.setTableNamePrefix(null);
 +    nameResolver.setTableNameSuffix(null);
 +    nameResolver.setColumnNamePrefix(null);
 +    nameResolver.setColumnNameSuffix(null);
 +
 +    //then
 +    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("logging_event");
-     assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("thread_name");
++    assertThat(nameResolver.getColumnName(ColumnName.THREAD_NAME)).isEqualTo("thread_name");
 +  }
 +
 +}
diff --cc logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java
index 99a6698,99a6698..5a3463c
--- a/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java
@@@ -17,6 -17,6 +17,7 @@@ import ch.qos.logback.core.testUtil.Ran
  import ch.qos.logback.core.util.CoreTestConstants;
  import ch.qos.logback.core.util.ResilienceUtil;
  
++ at Ignore
  public class FileAppenderResilienceTest {
  
    FileAppender<Object> fa = new FileAppender<Object>();
@@@ -46,7 -46,7 +47,6 @@@
    }
  
    @Test
--  @Ignore
    public void manual() throws InterruptedException, IOException {
      Runner runner = new Runner(fa);
      Thread t = new Thread(runner);
diff --cc logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
index d242e9f,d242e9f..e7d2ffe
--- a/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
@@@ -27,6 -27,6 +27,7 @@@ import java.util.HashMap
  
  import org.junit.After;
  import org.junit.Before;
++import org.junit.Ignore;
  import org.junit.Test;
  import org.xml.sax.SAXParseException;
  
@@@ -172,6 -172,6 +173,7 @@@ public class IncludeActionTest 
    }
  
    @Test
++  @Ignore
    public void unknownURL() throws JoranException {
      System.setProperty(INCLUDE_KEY, "http://logback2345.qos.ch");
      tc.doConfigure(TOP_BY_URL);

http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=569f138e5747e97715c3cd21a4e60187539f3cd2
http://github.com/ceki/logback/commit/569f138e5747e97715c3cd21a4e60187539f3cd2

commit 569f138e5747e97715c3cd21a4e60187539f3cd2
Author: Tomasz Nurkiewicz <nurkiewicz at gmail.com>
Date:   Tue Mar 23 20:11:22 2010 +0100

    [LBCLASSIC-188] SimpleDBNameResolver unit tests

diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
index 3ca03b3..c30e929 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
@@ -13,34 +13,34 @@ public class SimpleDBNameResolver implements DBNameResolver {
   private String columnNameSuffix = "";
 
   public String getTableName(TableName tableName) {
-    return tableNamePrefix + tableName.name() + tableNameSuffix;
+    return tableNamePrefix + tableName.name().toLowerCase() + tableNameSuffix;
   }
 
   public String getLoggingEventColumnName(LoggingEventColumnName columnName) {
-    return columnNamePrefix + columnName.name() + columnNameSuffix;
+    return columnNamePrefix + columnName.name().toLowerCase() + columnNameSuffix;
   }
 
   public String getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName columnName) {
-    return columnNamePrefix + columnName.name() + columnNameSuffix;
+    return columnNamePrefix + columnName.name().toLowerCase() + columnNameSuffix;
   }
 
   public String getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName columnName) {
-    return columnNamePrefix + columnName.name() + columnNameSuffix;
+    return columnNamePrefix + columnName.name().toLowerCase() + columnNameSuffix;
   }
 
   public void setTableNamePrefix(String tableNamePrefix) {
-    this.tableNamePrefix = tableNamePrefix;
+    this.tableNamePrefix = tableNamePrefix != null? tableNamePrefix : "";
   }
 
   public void setTableNameSuffix(String tableNameSuffix) {
-    this.tableNameSuffix = tableNameSuffix;
+    this.tableNameSuffix = tableNameSuffix != null? tableNameSuffix : "";
   }
 
   public void setColumnNamePrefix(String columnNamePrefix) {
-    this.columnNamePrefix = columnNamePrefix;
+    this.columnNamePrefix = columnNamePrefix != null? columnNamePrefix : "";
   }
 
   public void setColumnNameSuffix(String columnNameSuffix) {
-    this.columnNameSuffix = columnNameSuffix;
+    this.columnNameSuffix = columnNameSuffix != null? columnNameSuffix : "";
   }
 }
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
index 8c6ee88..72bc206 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
@@ -3,6 +3,7 @@ package ch.qos.logback.classic.db;
 import ch.qos.logback.classic.db.names.CustomDBNameResolver;
 import ch.qos.logback.classic.db.names.DBNameResolver;
 import ch.qos.logback.classic.db.names.DefaultDBNameResolver;
+import ch.qos.logback.classic.db.names.SimpleDBNameResolver;
 import org.junit.Test;
 
 import static org.fest.assertions.Assertions.assertThat;
@@ -106,7 +107,7 @@ public class SQLBuilderTest {
   }
 
   @Test
-  public void shouldReturnCustomtSqlInsertLoggingPropertyQuery() throws Exception {
+  public void shouldReturnCustomSqlInsertLoggingPropertyQuery() throws Exception {
     //given
     DBNameResolver nameResolver = createCustomDBNameResolver();
 
@@ -118,4 +119,52 @@ public class SQLBuilderTest {
     assertThat(sql).isEqualTo(expected);
   }
 
+  private DBNameResolver createSimpleDBNameResolver() {
+    final SimpleDBNameResolver nameResolver = new SimpleDBNameResolver();
+    nameResolver.setTableNamePrefix("tp_");
+    nameResolver.setTableNameSuffix("_ts");
+    nameResolver.setColumnNamePrefix("cp_");
+    nameResolver.setColumnNameSuffix("_cs");
+    return nameResolver;
+  }
+
+  @Test
+  public void shouldReturnSimpleSqlInsertLoggingEventQuery() throws Exception {
+    //given
+    DBNameResolver nameResolver = createSimpleDBNameResolver();
+
+    //when
+    String sql = SQLBuilder.buildInsertSQL(nameResolver);
+
+    //then
+    final String expected = "INSERT INTO tp_logging_event_ts (cp_timestmp_cs, cp_formatted_message_cs, cp_logger_name_cs, cp_level_string_cs, cp_thread_name_cs, cp_reference_flag_cs, cp_caller_filename_cs, cp_caller_class_cs, cp_caller_method_cs, cp_caller_line_cs) VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?)";
+    assertThat(sql).isEqualTo(expected);
+  }
+
+  @Test
+  public void shouldReturnSimpleSqlInsertExceptionQuery() throws Exception {
+    //given
+    DBNameResolver nameResolver = createSimpleDBNameResolver();
+
+    //when
+    String sql = SQLBuilder.buildInsertExceptionSQL(nameResolver);
+
+    //then
+    final String expected = "INSERT INTO tp_logging_event_exception_ts (cp_event_id_cs, cp_i_cs, cp_trace_line_cs) VALUES (?, ?, ?)";
+    assertThat(sql).isEqualTo(expected);
+  }
+
+  @Test
+  public void shouldReturnSimpleSqlInsertLoggingPropertyQuery() throws Exception {
+    //given
+    DBNameResolver nameResolver = createSimpleDBNameResolver();
+
+    //when
+    String sql = SQLBuilder.buildInsertPropertiesSQL(nameResolver);
+
+    //then
+    final String expected = "INSERT INTO tp_logging_event_property_ts (cp_event_id_cs, cp_mapped_key_cs, cp_mapped_value_cs) VALUES (?, ?, ?)";
+    assertThat(sql).isEqualTo(expected);
+  }
+
 }
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/db/names/SimpleDBNameResolverTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/SimpleDBNameResolverTest.java
index f712b24..d87c603 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/db/names/SimpleDBNameResolverTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/SimpleDBNameResolverTest.java
@@ -1,8 +1,128 @@
 package ch.qos.logback.classic.db.names;
 
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.fest.assertions.Assertions.assertThat;
+
 /**
  * @author Tomasz Nurkiewicz
  * @since 2010-03-22
  */
 public class SimpleDBNameResolverTest {
+
+  private SimpleDBNameResolver nameResolver;
+
+  @Before
+  public void setUp() throws Exception {
+    nameResolver = new SimpleDBNameResolver();
+    /*nameResolver.setTableNameSuffix("_ts");
+    nameResolver.setColumnNamePrefix("cp_");
+    nameResolver.setColumnNameSuffix("_cs");*/
+  }
+
+  @Test
+  public void shouldReturnTableNameWithPrefix() throws Exception {
+    //given
+
+    //when
+    nameResolver.setTableNamePrefix("tp_");
+
+    //then
+    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("tp_logging_event");
+    assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("thread_name");
+  }
+
+  @Test
+  public void shouldReturnTableNameWithSuffix() throws Exception {
+    //given
+
+    //when
+    nameResolver.setTableNameSuffix("_ts");
+
+    //then
+    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("logging_event_ts");
+    assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("thread_name");
+  }
+
+  @Test
+  public void shouldReturnTableNameWithBothPrefixAndSuffix() throws Exception {
+    //given
+
+    //when
+    nameResolver.setTableNamePrefix("tp_");
+    nameResolver.setTableNameSuffix("_ts");
+
+    //then
+    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("tp_logging_event_ts");
+    assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("thread_name");
+  }
+
+  @Test
+  public void shouldReturnColumnNameWithPrefix() throws Exception {
+    //given
+
+    //when
+    nameResolver.setColumnNamePrefix("cp_");
+
+    //then
+    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("logging_event");
+    assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("cp_thread_name");
+  }
+
+  @Test
+  public void shouldReturnColumnNameWithSuffix() throws Exception {
+    //given
+
+    //when
+    nameResolver.setColumnNameSuffix("_cs");
+
+    //then
+    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("logging_event");
+    assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("thread_name_cs");
+  }
+
+  @Test
+  public void shouldReturnColumnNameWithBothPrefixAndSuffix() throws Exception {
+    //given
+
+    //when
+    nameResolver.setColumnNamePrefix("cp_");
+    nameResolver.setColumnNameSuffix("_cs");
+
+    //then
+    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("logging_event");
+    assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("cp_thread_name_cs");
+  }
+
+  @Test
+  public void shouldReturnTableAndColumnNamesWithBothPrefixAndSuffix() throws Exception {
+    //given
+
+    //when
+    nameResolver.setTableNamePrefix("tp_");
+    nameResolver.setTableNameSuffix("_ts");
+    nameResolver.setColumnNamePrefix("cp_");
+    nameResolver.setColumnNameSuffix("_cs");
+
+    //then
+    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("tp_logging_event_ts");
+    assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("cp_thread_name_cs");
+  }
+
+  @Test
+  public void shouldHandleNullsAsEmptyStrings() throws Exception {
+    //given
+
+    //when
+    nameResolver.setTableNamePrefix(null);
+    nameResolver.setTableNameSuffix(null);
+    nameResolver.setColumnNamePrefix(null);
+    nameResolver.setColumnNameSuffix(null);
+
+    //then
+    assertThat(nameResolver.getTableName(TableName.LOGGING_EVENT)).isEqualTo("logging_event");
+    assertThat(nameResolver.getLoggingEventColumnName(LoggingEventColumnName.THREAD_NAME)).isEqualTo("thread_name");
+  }
+
 }

http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=2f15b38b16cef98708af85b4c238e20884fc8f51
http://github.com/ceki/logback/commit/2f15b38b16cef98708af85b4c238e20884fc8f51

commit 2f15b38b16cef98708af85b4c238e20884fc8f51
Author: Tomasz Nurkiewicz <nurkiewicz at gmail.com>
Date:   Tue Mar 23 00:00:29 2010 +0100

    [LBCLASSIC-188] SQLBuilder tests for custom name resolver

diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
index 443b082..8c6ee88 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
@@ -1,5 +1,6 @@
 package ch.qos.logback.classic.db;
 
+import ch.qos.logback.classic.db.names.CustomDBNameResolver;
 import ch.qos.logback.classic.db.names.DBNameResolver;
 import ch.qos.logback.classic.db.names.DefaultDBNameResolver;
 import org.junit.Test;
@@ -51,6 +52,70 @@ public class SQLBuilderTest {
     assertThat(sql).isEqualTo(expected);
   }
 
+  @Test
+  public void shouldReturnCustomSqlInsertLoggingEventQuery() throws Exception {
+    //given
+    DBNameResolver nameResolver = createCustomDBNameResolver();
+
+    //when
+    String sql = SQLBuilder.buildInsertSQL(nameResolver);
+
+    //then
+    final String expected = "INSERT INTO alpha (a, b, c, d, e, f, g, h, i, j) VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?)";
+    assertThat(sql).isEqualTo(expected);
+  }
+
+  private DBNameResolver createCustomDBNameResolver() {
+    final CustomDBNameResolver nameResolver = new CustomDBNameResolver();
+    nameResolver.setLoggingEventTableName("alpha");
+    nameResolver.setLoggingEventExceptionTableName("beta");
+    nameResolver.setLoggingEventPropertyTableName("gamma");
+
+    nameResolver.setLoggingEventTimestmpColumnName("a");
+    nameResolver.setLoggingEventFormattedMessageColumnName("b");
+    nameResolver.setLoggingEventLoggerNameColumnName("c");
+    nameResolver.setLoggingEventLevelStringColumnName("d");
+    nameResolver.setLoggingEventThreadNameColumnName("e");
+    nameResolver.setLoggingEventReferenceFlagColumnName("f");
+    nameResolver.setLoggingEventCallerFilenameColumnName("g");
+    nameResolver.setLoggingEventCallerClassColumnName("h");
+    nameResolver.setLoggingEventCallerMethodColumnName("i");
+    nameResolver.setLoggingEventCallerLineColumnName("j");
+
+    nameResolver.setLoggingEventExceptionEventIdColumnName("k");
+    nameResolver.setLoggingEventExceptionIColumnName("l");
+    nameResolver.setLoggingEventExceptionTraceLineColumnName("m");
+
+    nameResolver.setLoggingEventPropertyEventIdColumnName("n");
+    nameResolver.setLoggingEventPropertyMappedKeyColumnName("o");
+    nameResolver.setLoggingEventPropertyMappedValueColumnName("p");
+    return nameResolver;
+  }
+
+  @Test
+  public void shouldReturnCustomSqlInsertExceptionQuery() throws Exception {
+    //given
+    DBNameResolver nameResolver = createCustomDBNameResolver();
 
+    //when
+    String sql = SQLBuilder.buildInsertExceptionSQL(nameResolver);
+
+    //then
+    final String expected = "INSERT INTO beta (k, l, m) VALUES (?, ?, ?)";
+    assertThat(sql).isEqualTo(expected);
+  }
+
+  @Test
+  public void shouldReturnCustomtSqlInsertLoggingPropertyQuery() throws Exception {
+    //given
+    DBNameResolver nameResolver = createCustomDBNameResolver();
+
+    //when
+    String sql = SQLBuilder.buildInsertPropertiesSQL(nameResolver);
+
+    //then
+    final String expected = "INSERT INTO gamma (n, o, p) VALUES (?, ?, ?)";
+    assertThat(sql).isEqualTo(expected);
+  }
 
 }

http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=dc2438ed69e0a56e9ecb4e87ef29ef142ad5557b
http://github.com/ceki/logback/commit/dc2438ed69e0a56e9ecb4e87ef29ef142ad5557b

commit dc2438ed69e0a56e9ecb4e87ef29ef142ad5557b
Author: Tomasz Nurkiewicz <nurkiewicz at gmail.com>
Date:   Mon Mar 22 23:51:19 2010 +0100

    [LBCLASSIC-188] SQLBuilder tests for default name resolver

diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/SQLBuilder.java b/logback-classic/src/main/java/ch/qos/logback/classic/db/SQLBuilder.java
index 9c197a0..7c724aa 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/SQLBuilder.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/SQLBuilder.java
@@ -11,8 +11,8 @@ public class SQLBuilder {
   static String buildInsertPropertiesSQL(DBNameResolver dbNameResolver) {
     StringBuilder sqlBuilder = new StringBuilder("INSERT INTO ");
     sqlBuilder.append(dbNameResolver.getTableName(TableName.LOGGING_EVENT_PROPERTY)).append(" (");
-    sqlBuilder.append(dbNameResolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.EVENT_ID)).append(",");
-    sqlBuilder.append(dbNameResolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.MAPPED_KEY)).append(",");
+    sqlBuilder.append(dbNameResolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.EVENT_ID)).append(", ");
+    sqlBuilder.append(dbNameResolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.MAPPED_KEY)).append(", ");
     sqlBuilder.append(dbNameResolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.MAPPED_VALUE)).append(") ");
     sqlBuilder.append("VALUES (?, ?, ?)");
     return sqlBuilder.toString();
@@ -21,8 +21,8 @@ public class SQLBuilder {
   static String buildInsertExceptionSQL(DBNameResolver dbNameResolver) {
     StringBuilder sqlBuilder = new StringBuilder("INSERT INTO ");
     sqlBuilder.append(dbNameResolver.getTableName(TableName.LOGGING_EVENT_EXCEPTION)).append(" (");
-    sqlBuilder.append(dbNameResolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.EVENT_ID)).append(",");
-    sqlBuilder.append(dbNameResolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.I)).append(",");
+    sqlBuilder.append(dbNameResolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.EVENT_ID)).append(", ");
+    sqlBuilder.append(dbNameResolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.I)).append(", ");
     sqlBuilder.append(dbNameResolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.TRACE_LINE)).append(") ");
     sqlBuilder.append("VALUES (?, ?, ?)");
     return sqlBuilder.toString();
@@ -41,7 +41,7 @@ public class SQLBuilder {
     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.CALLER_CLASS)).append(", ");
     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.CALLER_METHOD)).append(", ");
     sqlBuilder.append(dbNameResolver.getLoggingEventColumnName(LoggingEventColumnName.CALLER_LINE)).append(") ");
-    sqlBuilder.append(" VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?)");
+    sqlBuilder.append("VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?)");
     return sqlBuilder.toString();
   }
 }
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
new file mode 100644
index 0000000..443b082
--- /dev/null
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
@@ -0,0 +1,56 @@
+package ch.qos.logback.classic.db;
+
+import ch.qos.logback.classic.db.names.DBNameResolver;
+import ch.qos.logback.classic.db.names.DefaultDBNameResolver;
+import org.junit.Test;
+
+import static org.fest.assertions.Assertions.assertThat;
+
+/**
+ * @author Tomasz Nurkiewicz
+ * @since 2010-03-22
+ */
+public class SQLBuilderTest {
+
+  @Test
+  public void shouldReturnDefaultSqlInsertLoggingEventQuery() throws Exception {
+    //given
+    DBNameResolver nameResolver = new DefaultDBNameResolver();
+
+    //when
+    String sql = SQLBuilder.buildInsertSQL(nameResolver);
+
+    //then
+    final String expected = "INSERT INTO logging_event (timestmp, formatted_message, logger_name, level_string, thread_name, reference_flag, caller_filename, caller_class, caller_method, caller_line) VALUES (?, ?, ? ,?, ?, ?, ?, ?, ?, ?)";
+    assertThat(sql).isEqualTo(expected);
+  }
+
+  @Test
+  public void shouldReturnDefaultSqlInsertExceptionQuery() throws Exception {
+    //given
+    DBNameResolver nameResolver = new DefaultDBNameResolver();
+
+    //when
+    String sql = SQLBuilder.buildInsertExceptionSQL(nameResolver);
+
+    //then
+    final String expected = "INSERT INTO logging_event_exception (event_id, i, trace_line) VALUES (?, ?, ?)";
+    assertThat(sql).isEqualTo(expected);
+  }
+
+  @Test
+  public void shouldReturnDefaultSqlInsertLoggingPropertyQuery() throws Exception {
+    //given
+    DBNameResolver nameResolver = new DefaultDBNameResolver();
+
+    //when
+    String sql = SQLBuilder.buildInsertPropertiesSQL(nameResolver);
+
+    //then
+    final String expected = "INSERT INTO logging_event_property (event_id, mapped_key, mapped_value) VALUES (?, ?, ?)";
+    assertThat(sql).isEqualTo(expected);
+  }
+
+
+
+}
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/db/names/SimpleDBNameResolverTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/SimpleDBNameResolverTest.java
new file mode 100644
index 0000000..f712b24
--- /dev/null
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/SimpleDBNameResolverTest.java
@@ -0,0 +1,8 @@
+package ch.qos.logback.classic.db.names;
+
+/**
+ * @author Tomasz Nurkiewicz
+ * @since 2010-03-22
+ */
+public class SimpleDBNameResolverTest {
+}

http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=0851bedca5864da9bd729793393dfcb47417292e
http://github.com/ceki/logback/commit/0851bedca5864da9bd729793393dfcb47417292e

commit 0851bedca5864da9bd729793393dfcb47417292e
Author: Tomasz Nurkiewicz <nurkiewicz at gmail.com>
Date:   Sun Mar 21 23:58:37 2010 +0100

    [LBCLASSIC-188] SimpleDBNameResolver C&P bugfix

diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
index 2fdcd32..3ca03b3 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
@@ -13,7 +13,7 @@ public class SimpleDBNameResolver implements DBNameResolver {
   private String columnNameSuffix = "";
 
   public String getTableName(TableName tableName) {
-    return tableNamePrefix + tableName.name() + columnNamePrefix;
+    return tableNamePrefix + tableName.name() + tableNameSuffix;
   }
 
   public String getLoggingEventColumnName(LoggingEventColumnName columnName) {

http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=80fb8ac10abdf2db8aafb05e8899660879d2ebd4
http://github.com/ceki/logback/commit/80fb8ac10abdf2db8aafb05e8899660879d2ebd4

commit 80fb8ac10abdf2db8aafb05e8899660879d2ebd4
Author: Tomasz Nurkiewicz <nurkiewicz at gmail.com>
Date:   Fri Mar 19 18:47:30 2010 +0100

    [LBCLASSIC-188] SimpleDBNameResolver allowing to customize table and column prefixes/suffixes

diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
new file mode 100644
index 0000000..2fdcd32
--- /dev/null
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
@@ -0,0 +1,46 @@
+package ch.qos.logback.classic.db.names;
+
+/**
+ * TODO: Handle null prefixes/suffixes somehow
+ * @author Tomasz Nurkiewicz
+ * @since 2010-03-19
+ */
+public class SimpleDBNameResolver implements DBNameResolver {
+
+  private String tableNamePrefix = "";
+  private String tableNameSuffix = "";
+  private String columnNamePrefix = "";
+  private String columnNameSuffix = "";
+
+  public String getTableName(TableName tableName) {
+    return tableNamePrefix + tableName.name() + columnNamePrefix;
+  }
+
+  public String getLoggingEventColumnName(LoggingEventColumnName columnName) {
+    return columnNamePrefix + columnName.name() + columnNameSuffix;
+  }
+
+  public String getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName columnName) {
+    return columnNamePrefix + columnName.name() + columnNameSuffix;
+  }
+
+  public String getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName columnName) {
+    return columnNamePrefix + columnName.name() + columnNameSuffix;
+  }
+
+  public void setTableNamePrefix(String tableNamePrefix) {
+    this.tableNamePrefix = tableNamePrefix;
+  }
+
+  public void setTableNameSuffix(String tableNameSuffix) {
+    this.tableNameSuffix = tableNameSuffix;
+  }
+
+  public void setColumnNamePrefix(String columnNamePrefix) {
+    this.columnNamePrefix = columnNamePrefix;
+  }
+
+  public void setColumnNameSuffix(String columnNameSuffix) {
+    this.columnNameSuffix = columnNameSuffix;
+  }
+}

http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=a9d4721dbca8c77e5b005bca28f15f1757873b74
http://github.com/ceki/logback/commit/a9d4721dbca8c77e5b005bca28f15f1757873b74

commit a9d4721dbca8c77e5b005bca28f15f1757873b74
Author: Tomasz Nurkiewicz <nurkiewicz at gmail.com>
Date:   Fri Mar 19 18:42:40 2010 +0100

    [LBCLASSIC-188] Unit tests of DBNameResolver implementations

diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/db/names/CustomDBNameResolverTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/CustomDBNameResolverTest.java
new file mode 100644
index 0000000..cde1417
--- /dev/null
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/CustomDBNameResolverTest.java
@@ -0,0 +1,136 @@
+package ch.qos.logback.classic.db.names;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.fest.assertions.Assertions.assertThat;
+
+/**
+ * @author Tomasz Nurkiewicz
+ * @since 2010-03-18
+ */
+public class CustomDBNameResolverTest {
+  private CustomDBNameResolver resolver;
+
+  @Before
+  public void setUp() throws Exception {
+    resolver = new CustomDBNameResolver();
+  }
+
+  @Test
+  public void shouldReturnDefaultTableName() throws Exception {
+    //when
+    String tableName = resolver.getTableName(TableName.LOGGING_EVENT);
+
+    //then
+    assertThat(tableName).isEqualTo("logging_event");
+  }
+
+  @Test
+  public void shouldReturnDefaultLoggingEventColumnName() throws Exception {
+    //when
+    String columnName = resolver.getLoggingEventColumnName(LoggingEventColumnName.LOGGER_NAME);
+
+    //then
+    assertThat(columnName).isEqualTo("logger_name");
+  }
+
+  @Test
+  public void shouldReturnDefaultLoggingPropertyColumnName() throws Exception {
+    //when
+    String columnName = resolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.MAPPED_VALUE);
+
+    //then
+    assertThat(columnName).isEqualTo("mapped_value");
+  }
+
+  @Test
+  public void shouldReturnDefaultLoggingExceptionColumnName() throws Exception {
+    //when
+    String columnName = resolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.EVENT_ID);
+
+    //then
+    assertThat(columnName).isEqualTo("event_id");
+  }
+
+  @Test
+  public void shouldReturnModifiedTableName() throws Exception {
+    //when
+    resolver.setLoggingEventExceptionTableName("tbl_logging_event_exception");
+    String tableName = resolver.getTableName(TableName.LOGGING_EVENT_EXCEPTION);
+
+    //then
+    assertThat(tableName).isEqualTo("tbl_logging_event_exception");
+  }
+
+  @Test
+  public void shouldReturnModifiedLoggingEventColumnName() throws Exception {
+    //when
+    resolver.setLoggingEventCallerFilenameColumnName("c_caller_filename");
+    String columnName = resolver.getLoggingEventColumnName(LoggingEventColumnName.CALLER_FILENAME);
+
+    //then
+    assertThat(columnName).isEqualTo("c_caller_filename");
+  }
+
+  @Test
+  public void shouldReturnModifiedLoggingPropertyColumnName() throws Exception {
+    //when
+    resolver.setLoggingEventPropertyMappedKeyColumnName("c_mapped_key");
+    String columnName = resolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.MAPPED_KEY);
+
+    //then
+    assertThat(columnName).isEqualTo("c_mapped_key");
+  }
+
+  @Test
+  public void shouldReturnModifiedLoggingExceptionColumnName() throws Exception {
+    //when
+    resolver.setLoggingEventExceptionIColumnName("c_i");
+    String columnName = resolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.I);
+
+    //then
+    assertThat(columnName).isEqualTo("c_i");
+  }
+
+  @Test
+  public void shouldReturnDefaultTableNameWhenNullGiven() throws Exception {
+    //when
+    resolver.setLoggingEventExceptionTableName(null);
+    String tableName = resolver.getTableName(TableName.LOGGING_EVENT_PROPERTY);
+
+    //then
+    assertThat(tableName).isEqualTo("logging_event_property");
+  }
+
+  @Test
+  public void shouldReturnDefaultLoggingEventColumnNameWhenNullGiven() throws Exception {
+    //when
+    resolver.setLoggingEventCallerFilenameColumnName(null);
+    String columnName = resolver.getLoggingEventColumnName(LoggingEventColumnName.CALLER_CLASS);
+
+    //then
+    assertThat(columnName).isEqualTo("caller_class");
+  }
+
+  @Test
+  public void shouldReturnDefaultLoggingPropertyColumnNameWhenNullGiven() throws Exception {
+    //when
+    resolver.setLoggingEventPropertyMappedKeyColumnName(null);
+    String columnName = resolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.EVENT_ID);
+
+    //then
+    assertThat(columnName).isEqualTo("event_id");
+  }
+
+  @Test
+  public void shouldReturnDefaultLoggingExceptionColumnNameWhenNullGiven() throws Exception {
+    //when
+    resolver.setLoggingEventExceptionIColumnName(null);
+    String columnName = resolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.I);
+
+    //then
+    assertThat(columnName).isEqualTo("i");
+  }
+
+}
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/db/names/DefaultDBNameResolverTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/DefaultDBNameResolverTest.java
new file mode 100644
index 0000000..6318da3
--- /dev/null
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/db/names/DefaultDBNameResolverTest.java
@@ -0,0 +1,57 @@
+package ch.qos.logback.classic.db.names;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.fest.assertions.Assertions.assertThat;
+
+/**
+ * @author Tomasz Nurkiewicz
+ * @since 2010-03-18
+ */
+public class DefaultDBNameResolverTest {
+
+  private DefaultDBNameResolver resolver;
+
+  @Before
+  public void setUp() throws Exception {
+    resolver = new DefaultDBNameResolver();
+  }
+
+  @Test
+  public void testGetLoggingEventColumnName() throws Exception {
+    //when
+    String columnName = resolver.getLoggingEventColumnName(LoggingEventColumnName.LOGGER_NAME);
+
+    //then
+    assertThat(columnName).isEqualTo("logger_name");
+  }
+
+  @Test
+  public void testGetLoggingEventPropertyColumnName() throws Exception {
+    //when
+    String columnName = resolver.getLoggingEventPropertyColumnName(LoggingEventPropertyColumnName.MAPPED_KEY);
+
+    //then
+    assertThat(columnName).isEqualTo("mapped_key");
+  }
+
+  @Test
+  public void testGetLoggingEventExceptionColumnName() throws Exception {
+    //when
+    String columnName = resolver.getLoggingEventExceptionColumnName(LoggingEventExceptionColumnName.TRACE_LINE);
+
+    //then
+    assertThat(columnName).isEqualTo("trace_line");
+  }
+
+  @Test
+  public void testGetTableName() throws Exception {
+    //when
+    String tableName = resolver.getTableName(TableName.LOGGING_EVENT_EXCEPTION);
+
+    //then
+    assertThat(tableName).isEqualTo("logging_event_exception");
+  }
+
+}

http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=e804e15654e6b911de4d771f2b3a88a405233d42
http://github.com/ceki/logback/commit/e804e15654e6b911de4d771f2b3a88a405233d42

commit e804e15654e6b911de4d771f2b3a88a405233d42
Author: Tomasz Nurkiewicz <nurkiewicz at gmail.com>
Date:   Fri Mar 19 18:42:09 2010 +0100

    [LBCLASSIC-188] Setter name refactoring

diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java
index 0880aa5..b020d0f 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java
@@ -95,11 +95,11 @@ public class CustomDBNameResolver implements DBNameResolver {
     lePropertyColumnNameOverrides.put(LoggingEventPropertyColumnName.EVENT_ID, columnName);
   }
 
-  public void setMappedKeyColumnName(String columnName) {
+  public void setLoggingEventPropertyMappedKeyColumnName(String columnName) {
     lePropertyColumnNameOverrides.put(LoggingEventPropertyColumnName.MAPPED_KEY, columnName);
   }
 
-  public void setMappedValueColumnName(String columnName) {
+  public void setLoggingEventPropertyMappedValueColumnName(String columnName) {
     lePropertyColumnNameOverrides.put(LoggingEventPropertyColumnName.MAPPED_VALUE, columnName);
   }
 

http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=97af7f3deb4f81e0877f5c5076d477010725dfef
http://github.com/ceki/logback/commit/97af7f3deb4f81e0877f5c5076d477010725dfef

commit 97af7f3deb4f81e0877f5c5076d477010725dfef
Author: Tomasz Nurkiewicz <nurkiewicz at gmail.com>
Date:   Fri Mar 19 18:38:33 2010 +0100

    [LBCLASSIC-188] Add FEST-Assert test dependency

diff --git a/pom.xml b/pom.xml
index 3fcf402..20d903f 100755
--- a/pom.xml
+++ b/pom.xml
@@ -32,8 +32,14 @@
       <version>4.4</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.easytesting</groupId>
+      <artifactId>fest-assert</artifactId>
+      <version>1.2</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
-  
+
   <properties>
     <!-- slf4j.version property is used below, in
          logback-classic/pom.xml and in setClasspath.cmd -->

http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=bf77adca9403f83b2dbaa849ce08000d4a06eaf8
http://github.com/ceki/logback/commit/bf77adca9403f83b2dbaa849ce08000d4a06eaf8

commit bf77adca9403f83b2dbaa849ce08000d4a06eaf8
Merge: 35a2ffe 1acd46c
Author: Tomasz Nurkiewicz <nurkiewicz at gmail.com>
Date:   Wed Mar 17 23:54:57 2010 +0100

    Merge branch 'master' of git://github.com/ceki/logback


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

Summary of changes:
 .../java/ch/qos/logback/classic/db/SQLBuilder.java |   10 +-
 .../classic/db/names/CustomDBNameResolver.java     |   52 --------
 .../logback/classic/db/names/DBNameResolver.java   |   18 +++-
 .../classic/db/names/SimpleDBNameResolver.java     |   42 +++++++
 .../ch/qos/logback/classic/db/names/TableName.java |    2 +-
 .../ch/qos/logback/classic/db/PackageTest.java     |    3 +-
 .../ch/qos/logback/classic/db/SQLBuilderTest.java  |  105 ++++++++++++++++
 .../db/names/DefaultDBNameResolverTest.java        |   57 +++++++++
 .../classic/{boolex => db/names}/PackageTest.java  |    5 +-
 .../classic/db/names/SimpleDBNameResolverTest.java |  128 ++++++++++++++++++++
 .../ch/qos/logback/core/db/DBAppenderBase.java     |    1 -
 pom.xml                                            |   10 ++-
 12 files changed, 366 insertions(+), 67 deletions(-)
 delete mode 100644 logback-classic/src/main/java/ch/qos/logback/classic/db/names/CustomDBNameResolver.java
 create mode 100644 logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java
 create mode 100644 logback-classic/src/test/java/ch/qos/logback/classic/db/SQLBuilderTest.java
 create mode 100644 logback-classic/src/test/java/ch/qos/logback/classic/db/names/DefaultDBNameResolverTest.java
 copy logback-classic/src/test/java/ch/qos/logback/classic/{boolex => db/names}/PackageTest.java (82%)
 create mode 100644 logback-classic/src/test/java/ch/qos/logback/classic/db/names/SimpleDBNameResolverTest.java


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


More information about the logback-dev mailing list