13 lines
262 B
Python
13 lines
262 B
Python
# test_logger.py
|
|
from utils.logger import log
|
|
import platform
|
|
|
|
def test_logging():
|
|
log.info(f"当前系统: {platform.system()}")
|
|
try:
|
|
1/0
|
|
except:
|
|
log.error("除零错误", exc_info=True)
|
|
|
|
if __name__ == "__main__":
|
|
test_logging() |