Create Log In Python

[Solved] Create Log In Python | Php - Code Explorer | yomemimo.com
Question : create log in python

Answered by : deepakchakravarthy

logging.basicConfig(filename="logfilename.log", level=logging.INFO)
# Log Creation
logging.info('your text goes here')
logging.error('your text goes here')
logging.debug('your text goes here')

Source : https://stackoverflow.com/questions/49580313/create-a-log-file?rq=1 | Last Update : Wed, 04 Nov 20

Question : python log file

Answered by : tense-termite-fknd4u7gmanv

import logging
logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG)
logging.debug('This message should go to the log file')
logging.info('So should this')
logging.warning('And this, too')
logging.error('And non-ASCII stuff, too, like Øresund and Malmö')

Source : https://docs.python.org/es/3/howto/logging.html | Last Update : Mon, 21 Jun 21

Answers related to create log in python

Code Explorer Popular Question For Php