Python日誌(logging)模塊使用方法簡介
介紹 A logger is configured to have a log level . This log level describes the severity of the messages that the logger will handle. Python defines the following log levels: § DEBUG : Low level system information for debugging purposes § INFO : General system information § WARNING : Information describing a minor problem that has occurred. § ERROR : Information describing a major problem that has occurred. § CRITICAL : Information describing a critical problem that has occurred. Each message that is written to the logger is a Log Record . Each log record also has a log level indicating the severity of that specific message. A log record can also contain useful metadata that describes the event that is being logged. This can include details such as a stack trace or an error code. When a message is given to the logger, the log level of the message is ...