根据下面的代码,我将程序的每一个细节都作为调试来获取,我想将其删除。运行应用程序时是否花费太多时间。
我怎样才能禁用那些[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.......
我正在获取程序的每一个细节作为调试,我想摆脱它。
ORMLite http://ormlite.com/如果日志级别已设置为 DEBUG 或 TRACE,则出于调试目的,会吐出许多日志消息。如果你正在使用 log4j 那么你需要寻找你log4j.properties
文件通常(在 Eclipse 中)位于您的src/main/resources
or src/test/resources
文件夹。它可能看起来像:
log4j.rootLogger=DEBUG, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
...
这表示默认日志记录级别是DEBUG
。如果你把它改成INFO
,它只会显示信息消息及以上内容。ERROR
只会显示错误及以上内容。
您可以通过将以下内容添加到您的文件中来专门关闭 ORMLite 消息log4j.properties
file:
log4j.logger.com.j256.ormlite=INFO
希望这可以帮助。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)