app/tests/test_log.py

12 lines
333 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from liteyukibot import log, logger
def test_set_level():
logger.info("Testing logger level")
logger.debug("Debug message")
log.set_level("DEBUG")
logger.debug("Debug message after level change")
if __name__ == "__main__":
test_set_level()
print("测试完成你应该只会看到一次debug信息")