课程: Advanced Python (2018)

今天就学习课程吧!

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

Overview of logging

Overview of logging

- [Instructor] In this chapter, we're going to learn about the logging features available in Python and why you would want to use them. Logging is an important tool in the development process because it enables your code to record events as the program executes for later analysis. You can think of logging as sort of like the black box of an airplane. It's always recording data about how things are functioning. And if something unexpected happens, you can use the log to help diagnose the issue in your program. It's also not always possible or feasible to use a regular debugger to step through your program's code to help analyze and solve problems in real time. For example, the code might be running on a remote server, making it difficult to debug locally. In addition, some kinds of errors and issues only happen on occasion during the program's lifetime. Logging makes it easy to categorized various events that occur while your program executes, which can help when you're trying to track…

内容