def test_log_add(self):
import logging
from logging.handlers import RotatingFileHandler
logger = self.fs.get_logger()
for index, handler in enumerate(logger.handlers):
if not isinstance(handler, RotatingFileHandler):
logger.handlers.pop(index)
logger.debug("Does this work?", "knl-29", "BATS")
logger.info("Does this work?", "knl-30", "BATS")
logger.warning("Does this work?", "knl-31", "BATS")
logger.error("Does this work?", "knl-33", "BATS")
logger.critical("Does this work?", "knl-test", "BATS")
logger.debug("Does this work?", None, "BATS")
logger.info("Does this work?", "knl-test")
logger.warning("Does this work?", "knl-test", None)
logger.error("Does this work?")
logger.critical("Does this work?", device_name="knl-test")
评论列表
文章目录