[logback-user] Trouble with setup logback to Oracle DB
Horia Balog
heb at architech.ca
Fri May 3 17:10:51 CEST 2013
Hi - need some help figuring out how to properly setup logback config to
Oracle DB.
I've managed to get it to work, but only getting the records in the DB when
closing the logger.
I am actually using logback through the Metrics library (
metrics.codahale.com), so using the logger through a metrics reporter
object.
But the end result is I can see the records (test records for now!) in the
DB only at the end of the test when I stop the metrics reporter.
Assuming this might be related to the config I'm using:
<appender name="DatabaseAppender"
class="ch.qos.logback.classic.db.DBAppender">
<connectionSource
class="ch.qos.logback.core.db.DriverManagerConnectionSource">
<driverClass>oracle.jdbc.OracleDriver</driverClass>
<url>jdbc:oracle:thin:@192.168.1.1:1521:XE</url>
<user>abcde</user>
<password>abcde</password>
</connectionSource>
</appender>
Is there a way for me to change the config so each record inserted is
committed right away?
Thanks,
Horia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130503/54d85b64/attachment.html>
More information about the Logback-user
mailing list