|
|
|
Re: Logback DBAppender in Virgo. [message #871121 is a reply to message #871120] |
Fri, 11 May 2012 00:23 |
Mastah Naleh Messages: 32 Registered: April 2012 |
Member |
|
|
Could you try :
<configuration>
<appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
<connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
<dataSource class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://${serverName}:${port}/${dbName}</url>
<user>${user}</user>
<password>${password}</password>
</dataSource>
</connectionSource>
</appender>
<root level="DEBUG">
<appender-ref ref="DB" />
</root>
</configuration>
That should do the trick.
Edit: you'll need org.springframework.jdbc.datasource as bundle import.
If you find better than using spring-orm feel free. I just did not checked all the data source around to see if they were working (I know that c3p0 and all datasource using DriverManager won't work)
[Updated on: Fri, 11 May 2012 00:27] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03290 seconds