0
我的logger.debug()
語句之一需要花費相當大量勞動力的輸入。Python:根據日誌記錄級別執行操作
我知道我應該做logger.debug("The spam is %s", spam_temperature)
而不是logger.debug("The spam is {}".format(spam_temperature))
。問題是我需要執行的操作實際發現spam_temperature
的CPU密集程度相當高,如果日誌記錄級別爲INFO
,則我無法使用它們。
這種情況下的最佳做法是什麼?