Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse shows strange [DEBUG], I want to disable it

As per the below Code, I am getting every single details of the program as debug, which I want to get rid of. If is taking too much time when running the Application.

How can I get those [DEBUG] disabled?

2012-01-24 18:47:25,305 [ERROR] SqliteDatabaseType WARNING: you seem to not be using the Xerial SQLite driver.  See ORMLite docs on SQLite: http://ormlite.com/docs/sqlite
2012-01-24 18:47:25,379 [DEBUG] DaoManager created dao for class class .......
2012-01-24 18:47:25,385 [DEBUG] DaoManager created dao for class class .......
2012-01-24 18:47:25,397 [DEBUG] DaoManager created dao for class class .......
2012-01-24 18:47:25,398 [DEBUG] DaoManager created dao for class class .......
2012-01-24 18:47:25,401 [DEBUG] DaoManager created dao for class class .......
2012-01-24 18:47:25,401 [DEBUG] DaoManager created dao for class class .......
2012-01-24 18:47:25,402 [DEBUG] DaoManager created dao for class class .......
2012-01-24 18:47:25,403 [DEBUG] DaoManager created dao for class class .......
2012-01-24 18:47:25,404 [DEBUG] DaoManager created dao for class class .......
2012-01-24 18:47:25,404 [DEBUG] DaoManager created dao for class class .......
2012-01-24 18:47:25,635 [DEBUG] StatementBuilder built statement SELECT.......
like image 546
Ammar Avatar asked Jan 24 '12 17:01

Ammar


1 Answers

I am getting every single details of the program as debug, which I want to get rid of.

ORMLite spits out a number of log messages for debugging purposes if the log level has been set for DEBUG or TRACE. If you are using log4j then you need to look for you log4j.properties file which is often (in Eclipse) in your src/main/resources or src/test/resources folders. It could look something like:

log4j.rootLogger=DEBUG, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
...

This says that the default logging level is DEBUG. If you change it to INFO, it will only show information messages and above. ERROR will only show errors and above.

You could turn off the ORMLite messages specifically by adding the following to your log4j.properties file:

log4j.logger.com.j256.ormlite=INFO

Hope this helps.

like image 189
Gray Avatar answered Oct 05 '22 07:10

Gray