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

According to the code below, I get all the details of the program as debugs, which I want to get rid of. If the application starts up takes too much time.

How can I disable these [DEBUG]?

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....... 
+4
source share
3 answers

ORMLite generates multiple log messages for debugging purposes if the log level is set to DEBUG or TRACE. If you use log4j, you need to look for the log4j.properties file, which is often (in Eclipse) located in the src/main/resources or src/test/resources folders. It might look something like this:

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

This indicates that the default logging level is DEBUG . If you change it to INFO , it will only display informational messages and higher. ERROR will only show errors and higher.

You can disable ORMLite messages by adding the following to your log4j.properties file:

 log4j.logger.com.j256.ormlite=INFO 

Hope this helps.

+7
source

In your log properties file, change the log level and turn off the debug level.

0
source

In my case, Spring caused a "problem". After removing pom.xml from the file (I really don't need spring anymore), tons of logs disappeared! Honestly, I don’t know where to set the debugging level of the Spring logs, but it can be useful for those who have Spring and do not know where to start the search.

0
source

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


All Articles