SYSLOG is a standard for message logging and is used by almost every system type, do a search for RFC 5424 and review. Python's logging library serves a similar function, with 5 debug levels.
Create a new file as Exercises_10/system_logging.py
import logging
from datetime import datetime
# Get the date and time and use as a filename
now = datetime.now()
file_name = '%0.4d%0.2d%0.2d-%0.2d%0.2d%0.2d' % (now.year, now.month, now.day, now.hour, now.minute, now.second)
# Set logging to that file
logging.basicConfig(filename=file_name, filemode='w', format='%(name)s - %(levelname)s - %(message)s')
logging.debug('Debug message')
logging.info('Information message')
logging.warning('Warning message')
logging.error('Error message')
logging.critical('Critical message')