ft_transcendence/srcs/.venv/lib/python3.11/site-packages/restapi/log.py

15 lines
266 B
Python
Raw Permalink Normal View History

2023-11-23 10:43:30 -05:00
import logging
logger = logging.getLogger('api')
def log(text, *args):
log_text = text if not args else text % tuple(args)
logger.info(log_text)
def error(text, *args):
log_text = text if not args else text % tuple(args)
logger.error(log_text)