from loguru import logger
logger.debug('this is a debug message')
id = log=logger.add('world_{time:YYYY-MM-DD}.log',format="{time} | {level} | {message}", level="INFO",rotation="10 MB", retention="30 days",compression="zip", enqueue=True)
logger.debug('i am debug message')
logger.info('i am info message')
logger.error('i am error message')
def b_function1(x):try:return1/ x
except ZeroDivisionError:
logger.exception("exception!!!")b_function1(0)
logger.remove(id)