java - logback: DBAppender not writing to logging_event_exception -


i have 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 expecting simple test create entry in 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 inserts entry logging_event_table. missing in configuration?

thanks.

found solution explained in last own comment: logback write logging_event_exception table have call public void error(string msg, throwable t)method.


Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -