课程: Advanced Python (2018)

今天就学习课程吧!

今天就开通帐号,24,600 门业界名师课程任您挑!

Basic logging

Basic logging

- To use Python's logging features, you import the logging module into your app. To send information to the log output, there are individual functions for each kind or level of message. There are five different methods to use for recording log messages. Debug, info, warning, error, and critical. Each of these methods corresponds to a particular type of message which are used to indicate different types of status of the application. Debug messages are typically used to provide diagnostic information that's useful when you are trying to track down a problem. Info messages are usually used to indicate that a particular interesting operation was able to complete normally. Warning messages indicate that something unexpected happened or that a more serious problem might be approaching such as running out of storage space or the inability to communicate with a remote server. Error messages indicate that a particular operation was unable to successfully complete. And critical messages…

内容