[logback-dev] svn commit: r879 - logback/trunk/logback-classic/src/test/input/db
noreply.seb at qos.ch
noreply.seb at qos.ch
Tue Nov 7 11:16:08 CET 2006
Author: seb
Date: Tue Nov 7 11:16:08 2006
New Revision: 879
Added:
logback/trunk/logback-classic/src/test/input/db/append-toMySQL-with-driverManager.xml
- copied, changed from r870, /logback/trunk/logback-classic/src/test/input/db/dbAppenderUsingConnectionSource.xml
logback/trunk/logback-classic/src/test/input/db/append-with-c3p0.xml
logback/trunk/logback-classic/src/test/input/db/append-with-datasource.xml
logback/trunk/logback-classic/src/test/input/db/append-with-drivermanager.xml
logback/trunk/logback-classic/src/test/input/db/append-with-jndi.xml
logback/trunk/logback-classic/src/test/input/db/append-with-pooled-datasource.xml
logback/trunk/logback-classic/src/test/input/db/deleteTables.sql
Removed:
logback/trunk/logback-classic/src/test/input/db/dbAppenderUsingConnectionSource.xml
Log:
added some db example configs
Copied: logback/trunk/logback-classic/src/test/input/db/append-toMySQL-with-driverManager.xml (from r870, /logback/trunk/logback-classic/src/test/input/db/dbAppenderUsingConnectionSource.xml)
==============================================================================
--- /logback/trunk/logback-classic/src/test/input/db/dbAppenderUsingConnectionSource.xml (original)
+++ logback/trunk/logback-classic/src/test/input/db/append-toMySQL-with-driverManager.xml Tue Nov 7 11:16:08 2006
@@ -2,17 +2,17 @@
<appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
<connectionSource class="ch.qos.logback.classic.db.DriverManagerConnectionSource">
- <param name="driverClass" value="com.mysql.jdbc.Driver"/>
- <param name="url" value="jdbc:mysql://host_name:3306/datebase_name"/>
- <param name="user" value="logback"/>
- <param name="password" value="logback"/>
+ <driverClass>"com.mysql.jdbc.Driver</driverClass>
+ <url>jdbc:mysql://host_name:3306/datebase_name</url>
+ <user>logback</user>
+ <password>logback</password>
</connectionSource>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
- <param name="pattern" value="%p %t %c - %m%n"/>
+ <pattern>%level %thread %logger - %msg%n</pattern>
</layout>
</appender>
<root>
Added: logback/trunk/logback-classic/src/test/input/db/append-with-c3p0.xml
==============================================================================
--- (empty file)
+++ logback/trunk/logback-classic/src/test/input/db/append-with-c3p0.xml Tue Nov 7 11:16:08 2006
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<configuration>
+
+ <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
+ <connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
+ <dataSource class="com.mchange.v2.c3p0.ComboPooledDataSource">
+ <driverClass>${driverClass}</driverClass>
+ <jdbcUrl>${url}</jdbcUrl>
+ <serverName>${serverName}</serverName>
+ <databaseName>${databaseName}</databaseName>
+ <user>${user}</user>
+ <password>${password}</password>
+ <!--
+ <param name="initialConnections" value="10"/>
+ <param name="maxConnections" value="10"/>
+
+ <param name="max-connections" value="100"/>
+ <param name="min-connections" value="5" />
+ <param name="inactivity-timeout" value="200"/>
+ -->
+ </dataSource>
+
+ <user>${user}</user>
+ <password>${password}</password>
+ </connectionSource>
+ </appender>
+
+
+ <!-- Prevent internal logback DEBUG messages from polluting the output. -->
+ <logger name="ch.qos.logback.core.joran"><level value="INFO" /></logger>
+ <logger name="ch.qos.logback.classic.joran"><level value="INFO" /></logger>
+
+
+ <root>
+ <level value ="debug"/>
+ <appender-ref ref="DB" />
+ </root>
+</configuration>
+
+
Added: logback/trunk/logback-classic/src/test/input/db/append-with-datasource.xml
==============================================================================
--- (empty file)
+++ logback/trunk/logback-classic/src/test/input/db/append-with-datasource.xml Tue Nov 7 11:16:08 2006
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<configuration>
+
+ <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
+ <connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
+
+ <dataSource class="${dataSourceClass}">
+ <param name="${url-key:-url}" value="${url}"/>
+ <serverName>${serverName}</serverName>
+ <databaseName>${databaseName}</databaseName>
+ </dataSource>
+
+ <user>${user}</user>
+ <password>${password}</password>
+ </connectionSource>
+ </appender>
+
+ <!-- Prevent internal logback DEBUG messages from polluting the output. -->
+ <logger name="ch.qos.logback.core.joran"><level value="INFO" /></logger>
+ <logger name="ch.qos.logback.classic.joran"><level value="INFO" /></logger>
+
+ <root>
+ <level value ="debug"/>
+ <appender-ref ref="DB" />
+ </root>
+</configuration>
+
+
+
Added: logback/trunk/logback-classic/src/test/input/db/append-with-drivermanager.xml
==============================================================================
--- (empty file)
+++ logback/trunk/logback-classic/src/test/input/db/append-with-drivermanager.xml Tue Nov 7 11:16:08 2006
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<configuration>
+
+ <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
+ <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
+ <driverClass>${driverClass}</driverClass>
+ <url>${url}</url>
+ <user>${user}</user>
+ <password>${password}</password>
+ </connectionSource>
+ </appender>
+
+ <!-- Prevent internal logback DEBUG messages from polluting the output. -->
+ <logger name="ch.qos.logback.core.joran"><level value="INFO" /></logger>
+ <logger name="ch.qos.logback.classic.joran"><level value="INFO" /></logger>
+
+ <root>
+ <level value="debug" />
+ <appender-ref ref="DB" />
+ </root>
+</configuration>
+
+
Added: logback/trunk/logback-classic/src/test/input/db/append-with-jndi.xml
==============================================================================
--- (empty file)
+++ logback/trunk/logback-classic/src/test/input/db/append-with-jndi.xml Tue Nov 7 11:16:08 2006
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<configuration>
+ <!-- We create a joran rule that will instance and bind the appropriate
+ data source instance to JNDI. -->
+ <newRule pattern="configuration/bindDataSourceToJNDI"
+ actionClass="org.apache.log4j.db.BindDataSourceToJNDIAction"/>
+
+ <bindDataSourceToJNDI />
+
+ <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
+ <connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
+
+ <dataSource class="${dataSourceClass}">
+ <param name="${url-key:-url}" value="${url}"/>
+ <serverName>${serverName}</serverName>
+ <databaseName>${databaseName}</databaseName>
+ </dataSource>
+
+ <user>${user}</user>
+ <password>${password}</password>>
+ </connectionSource>
+ </appender>
+
+ <!-- Prevent internal logback DEBUG messages from polluting the output. -->
+ <logger name="ch.qos.logback.core.joran"><level value="INFO" /></logger>
+ <logger name="ch.qos.logback.classic.joran"><level value="INFO" /></logger>
+
+ <root>
+ <level value ="debug"/>
+ <appender-ref ref="DB" />
+ </root>
+
+</configuration>
+
+
Added: logback/trunk/logback-classic/src/test/input/db/append-with-pooled-datasource.xml
==============================================================================
--- (empty file)
+++ logback/trunk/logback-classic/src/test/input/db/append-with-pooled-datasource.xml Tue Nov 7 11:16:08 2006
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<configuration>
+
+ <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
+ <connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
+
+ <dataSource class="${pooledDataSourceClass}">
+ <param name="${url-key:-url}" value="${url}"/>
+ <serverName>${serverName}</serverName>
+ <databaseName>${databaseName}</databaseName>
+ <user>${user}</user>
+ <password>${password}</password>
+
+ <initialConnections>10</initialConnections>
+ <maxConnections>10</maxConnections>
+ </dataSource>
+
+ <user>${user}</user>
+ <password>${password}</password>
+ </connectionSource>
+ </appender>
+
+ <!-- Prevent internal logback DEBUG messages from polluting the output. -->
+ <logger name="ch.qos.logback.core.joran"><level value="INFO" /></logger>
+ <logger name="ch.qos.logback.classic.joran"><level value="INFO" /></logger>
+
+ <root>
+ <level value ="debug"/>
+ <appender-ref ref="DB" />
+ </root>
+</configuration>
+
+
Added: logback/trunk/logback-classic/src/test/input/db/deleteTables.sql
==============================================================================
--- (empty file)
+++ logback/trunk/logback-classic/src/test/input/db/deleteTables.sql Tue Nov 7 11:16:08 2006
@@ -0,0 +1,4 @@
+
+delete from logging_event_exception;
+delete from logging_event_property;
+delete from logging_event;
More information about the logback-dev
mailing list