On Monday, 13 August 2018 19:42:57 UTC+2, Léo El Amri wrote:
> On 13/08/2018 19:23, MRAB wrote:
> > Here you're configuring the logger, setting the name of the logfile and
> > the logging level, but not specifying the format, so it uses the default
> > format:
> >
> >> logging.basicConfig(filenam
#!/usr/bin/env python3
import logging
logging.basicConfig(filename='example.log',level=logging.DEBUG)
logging.basicConfig(format='%(asctime)s;%(levelname)s:%(message)s',
level=logging.DEBUG)
logging.debug('Message1)
logging.info('Message2')
logging.warning('Message3')
DEBUG:root:Message1
INFO:roo