Python 로깅

2020. 10. 29. 02:41정리

import logging

logging.basicConfig(
    level=logging.INFO,
    format='%(asctime)s [%(name)s] %(levelname)s: %(message)s (%(filename)s:%(lineno)s)',
)
logger = logging.getLogger('root')

logger.info('hello')