Hsqldb event log internal configuration

How to configure internal event monitoring in hsqldb? When I run my Java application, I get the following warnings:

log4j:WARN No appenders could be found for logger (HSQLDB2C7984E18B.org.hsqldb.persist.Logger).
log4j:WARN Please initialize the log4j system properly.

The documentation tells me that log4j is not the only option, but it does not tell me how to configure my application. Can someone point me to this documentation? Remember that I do not want to use log4j for hsqldb.

It should be noted that the third-party jar to which I refer requires log4j. Hsqldb automatically detects that log4j is present and then tries to use it? Or am I missing something fundamental in how the magazine works?

+3
source share
3 answers

Check this link . It says:

The registration service is sent to Log4j if Log4j is in the classpath, otherwise java.util.logging will be passed.

+1
source

The consequence of what the message indicates is that HSQLDB will not be registered because no add-ons were found.

If you want to suppress the message, add a line similar to the one below to the log4j.properties file:

log4j.logger.HSQLDB2C7984E18B.org.hsqldb.persist.Logger=FATAL

This will only log FATAL events that will not be executed during normal operation.

, log4j HSQLDB. , log4j, ( ..) log4j, .

"" , , HSQLDB.

0

, YWE, hsqldb log4j, , , log4j.properties, . :

  • log4j.properties :

    log4j.rootLogger=WARN, CONSOLE
    
  • VM:

    -Dlog4j.log4j.defaultInitOverride=true
    -Dlog4j.configuration=C:/full/path/to/my/log4j.properties
    
  • , , - (, hsqldb) log4j:

    org.apache.log4j.PropertyConfigurator.configure("log4j.properties");
    
0
source

Source: https://habr.com/ru/post/1776546/


All Articles