
Try placing the following at the beginning of your config file. You can also safely set debug attribute of the config element to false. Example: <configuration scan="true" scanPeriod="30 seconds"> <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener"/> ... /configuration> this will print status messages throughout the life of your application, not only after the configuration file is read. On 04/03/2010 4:05 PM, Mohammad Haider wrote:
Yes, the status message is:
Driver name=PostgreSQL Native Driver Driver version=PostgreSQL 8.4 JDBC3 (build 701) supportsGetGeneratedKeys=true true 11:01:54,843 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [file:/C:/Bids_WrkSpace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/TIPS/WEB-INF/classes/logback-test.xml]
11:01:55,015 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeFilter scanning period to 30 seconds 11:01:55,015 |-INFO in ch.qos.logback.classic.turbo.ReconfigureOnChangeFilter@17e845a - Will scan for changes in file [C:\Bids_WrkSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\TIPS\WEB-INF\classes\logback-test.xml] every 30 seconds. 11:01:55,015 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Adding ReconfigureOnChangeFilter as a turbo filter 11:01:55,140 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.db.DBAppender] 11:01:55,140 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [DB] 11:01:55,156 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component [connectionSource] on top of the object stack. 11:01:55,296 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [DB] from the object stack 11:01:55,296 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG 11:01:55,296 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [DB] to Logger[ROOT] 11:01:55,312 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
Ceki Gülcü wrote:
Are you seeing any status messages?
On 04/03/2010 3:49 PM, Mohammad Haider wrote:
Hi,
I have created three tables for logback according to documentation.
I have the following config. file: <?xml version="1.0" encoding="UTF-8"?> <configuration debug="true" scan="true" scanPeriod="30 seconds"> <appender name="DB" class="ch.qos.logback.classic.db.DBAppender"> <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource"> <driverClass>org.postgresql.Driver</driverClass> <url>jdbc:postgresql://localhost:5432/tips_log</url> <user>postgres</user> <password>test</password> </connectionSource> </appender>
<root level="debug"> <appender-ref ref="DB"/> </root> </configuration>
In my code I have put simple logger.debug("DB test");. However, I did not see any log data in the tables.
Can anyone please help about this issue? Why am I not getting any log data in the table?
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user