[logback-user] logback dbadapter configuration for a red5 application

jeffery durand jeff.durand at gmail.com
Mon Feb 18 19:48:30 CET 2008


Hi,

I'm trying to configure my red5 application to log everything to the  
database.  I have followed the instructions
as shown on the dbadapter configuration section in chapter 4.  I've  
tried both a simple standard configuration
and a pooled configuration.  I know that logging is working in general  
because i'm seeing my log messages in
the console.  I also used the mysql db table setup script provided by  
logback for mysql.  Furthermore, I am able to write
to the db from my application so i'm absolutely sure that the  
permissions are correct and the mysql driver is installed and in
my classpath.

I'm posting my config file minus my username and password.  Hopefully  
I have just missed something simple...  Thanks
for any help in advance..

Is there any way to log the logging so that I can see what's going  
wrong with my logging.  Seems strange but it would be useful....

jeff

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
         <consolePlugin/>
         <!-- Appenders http://logback.qos.ch/manual/appenders.html -->
         <appender name="OFLAC"
                 class="ch.qos.logback.core.ConsoleAppender">
                 <filter  
class="ch.qos.logback.classic.filter.LevelFilter">
                         <level>INFO</level>
                         <onMatch>ACCEPT</onMatch>
                         <onMismatch>DENY</onMismatch>
                 </filter>
                 <layout class="ch.qos.logback.classic.PatternLayout">
                         <Pattern>
                         %date [%thread] %-5level %logger - %msg%n
                         </Pattern>
                 </layout>
         </appender>
         <appender name="OFLADB"  
class="ch.qos.logback.classic.db.DBAppender">
            <connectionSource  
class="ch.qos.logback.core.db.DataSourceConnectionSource">
                 <dataSource  
class="com.mchange.v2.c3p0.ComboPooledDataSource">
                         <driverClass>com.mysql.jdbc.Driver</ 
driverClass>
                         <jdbcUrl>jdbc:mysql://127.0.0.1:3306/ 
statistics</jdbcUrl>
                         <user>myusername</user>
                         <password>mypassword</password>
               </dataSource>
             </connectionSource>
         </appender>
         <root>
                 <level value="DEBUG" />
                 <appender-ref red="OFLADB"/>
                 <appender-ref ref="OFLAC" />
         </root>
         <logger name="org.red5.server.webapp.oflaDemo">
                 <level value="INFO" />
         </logger>
</configuration>




More information about the Logback-user mailing list