from loguru import logger
logger.add('logs/z_project.log',
           level='DEBUG',
           format='{time:YYYY-MM-DD  :mm:ss} - {level} - {file} - {line} - {message}',
           rotation="10 MB")
logger.info('可以写日志了')