From the course: Advanced Python: Working With Data

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Basic logging

Basic logging

- [Instructor] To use Python's logging features, you need to 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, and there are five different methods to use for recording log messages. There's 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're trying to track down a problem. So information messages are usually used to indicate that a particularly interesting operation was able to complete normally. Warning messages indicate 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…

Contents