./ Alex Tech Blog / logging in Python

logging in Python

python

Snipped in how to logging in Python

import logging

logging.basicConfig(
    format='%(asctime)s - %(levelname)s - %(module)s - %(message)s',
    level=logging.INFO,
    filename='log.log'
)