import logging
logger = logging.getLogger(__name__)
FORMAT = '%(MYVAR)s %(asctime)s - %(levelname)s - %(message)s'
logging.basicConfig(format=FORMAT, datefmt='%d/%m/%Y %H:%M:%S')
logger.warning("'Twas brillig, and the slithy toves", extra={'MYVAR': 'Jabberwocky'})