logger.info和logger.debug之间的区别 [英] Difference between logger.info and logger.debug
问题描述
logger.debug
和 logger.info
之间有什么区别?
何时打印 logger.debug
?
推荐答案
这取决于日志记录配置。默认值取决于所使用的框架。我们的想法是,稍后通过将配置设置从INFO更改为DEBUG,您将看到更多(或更少,如果反过来)行打印而不重新编译整个应用程序。
This will depend on the logging configuration. The default value will depend on the framework being used. The idea is that later on by changing a configuration setting from INFO to DEBUG you will see a ton of more (or less if the other way around) lines printed without recompiling the whole application.
如果您认为使用哪一个,那么它可以归结为您想要在哪个级别上看到什么。对于其他级别,例如在Log4J中查看API, http ://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html
If you think which one to use then it boils down to thinking what you want to see on which level. For other levels for example in Log4J look at the API, http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html
这篇关于logger.info和logger.debug之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!