Hi all,

I am in the process of exploring logback so we can migrate our logging off of 
our current mishmash. As part of that I have been trying to configure to write 
to a MySQL database.

In the configuration file I have this:

  <appender name="DB" class="ch.qos.logback.access.db.DBAppender">
    <connectionSource 
class="ch.qos.logback.core.db.DriverManagerConnectionSource">
      <driverClass>com.mysql.jdbc.Driver</driverClass>
      <url>jdbc:mysql://localhost:3306/test</url>
      <user>logback</user>
      <password>logback</password>
    </connectionSource>
    <insertHeaders>true</insertHeaders>
  </appender>

  <root level="DEBUG">
    <appender-ref ref="STDOUT" />
    <appender-ref ref="FILE" />
    <appender-ref ref="DB" />
  </root>

And I've run the scripts to set up the tables in MySQL, and logback can 
apparently connect ok - if I change any of the parameters in the config I get 
errors about it not connecting.

On the console and in the logfile I can see output as I would expect, but the 
DB remains empty. I'm using MySQL 5.1.51 on a Mac, for what that's worth.


Stephen Schaeffer

________________________________
This message may contain confidential information and is intended for specific 
recipients unless explicitly noted otherwise. If you have reason to believe you 
are not an intended recipient of this message, please delete it and notify the 
sender. This message may not represent the opinion of IntercontinentalExchange, 
Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract 
or guarantee. Unencrypted electronic mail is not secure and the recipient of 
this message is expected to provide safeguards from viruses and pursue 
alternate means of communication where privacy or a binding message is desired.
_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user

Reply via email to