In order to get started you need to install the below library using the
pip command as shown below
pip install logging
After installing this library you need to make an
app.py file and copy paste the following code
# Configure the logging system
level = logging.ERROR)
# Variables (to make the calls that follow work)
hostname = 'www.python.org'
item = 'spam'
filename = 'data.csv'
mode = 'r'
# Example logging calls (insert into your program)
logging.critical('Host %s unknown', hostname)
logging.error("Couldn't find %r", item)
logging.warning('Feature is deprecated')
logging.info('Opening file %r, mode = %r', filename, mode)
if __name__ == '__main__':