I have the following logback.xml configuration
<?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>com.microsoft.sqlserver.jdbc.SQLServerDriver</driverClass>
<url>jdbc:sqlserver://servername:1433;databaseName=dbname</url>
<user>user</user>
<password>pass</password>
</connectionSource>
</appender>
<root>
<level value="debug" />
<appender-ref ref="DB" />
</root>
</configuration>
and was expecting this simple test to create an entry in the logging_event_exception table:
public static void main(String[] args) {
Logger logger = LoggerFactory.getLogger(MyClass.class);
try {
throw new RuntimeException("some error");
} catch (RuntimeException e) {
logger.error("test");
}
}
but it only inserts an entry into the logging_event_table. What am I missing in the configuration?
Thanks.