Eclipse shows strange [DEBUG], I want to disable it
Pergunta
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.......
Solução
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.
Outras dicas
In you log properties file, change the level of logs and disable the debug level.
In my case Spring caused the "problem". After removing from pom.xml (I really didn't need spring longer), tons of logs disappeared! Honestly, I don't know where to set Spring logs debug level, but it could be helpful for those who have Spring and do not know where to start search.