开发者

hsqldb messing up with my server´s logs

I have a server I made in Java that needs to use a database, I chose HSQLDB.

So I have a lot of entries in my server like:

Logger.getLogger(getClass().getName()).  severe or i开发者_运维技巧nfo  ("Some important information");

When I run my server it goes to System.out which I think its the default configuration of java.util.logging?, so far its ok for me, and later I will make it go to a file ...

But, the problem is, when I start hsqldb it messes up with the default configuration and I can´t read my log entries on System.out anymore..

I already tried to change hsqldb.log_data=false, but it still messes up the default configuration.

Can someone help me?? I dont want to log hsqldb events, just my server ones.

Thanks


This issue was reported and fixed in the latest version 2.2.0 released today.

Basically, you set a system property hsqldb.reconfig_logging to the string value false.

A system property is normally set with the -D option in the Java startup command for your application:

java -Dhsqldb.reconfig_logging=false ....

See below for details of the change:

http://sourceforge.net/tracker/?func=detail&aid=3195462&group_id=23316&atid=378131

In addition, when you use a fremework logger for your application, you should configure it directly to choose which levels of log to accept and which ones to ignore.

The hsqldb.applog setting does not affect framework logging and only controls the file log.

The hsqldb.log_data=false is for turning off internal data change logging and should not be used for normal databases. Its usage for bulk imports is explained in the Guide.


Try setting hsqldb.applog to 0, that shuts off application logging to the *.app.log file.


Start your server with a property pointing to the location of a dedicated properties file:

-Djava.util.logging.config.file=/location/of/your/hsqldblog.properties"

Which contains the following line to change Java logging for Hsqldb.

# Change hsqldb logging level 
org.hsqldb.persist = WARNING

Side note, you can choose from the following levels:

SEVERE WARNING INFO CONFIG FINE FINER FINEST

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜