GH avatar Bite 192. Some logging practice

This is a simple logging exercise. The logging module is very useful and is part of the standard library; unfortunately it is often neglected by new learners.

You are to take flesh out the log_it() function so that it will log to any LOG LEVEL and with any message passed to it. You will need to create globalvariables for each of the log levels, since those will be imported into the tests for testing.

LOG LEVELS:

  • DEBUG
  • INFO
  • WARNING
  • ERROR
  • CRITICAL

By default, all log messages are sent to the root logger, but for this bite you will have to give it the name of pybites_logger.

You should breeze through this one!

30 out of 34 users completed this Bite.
Will you be Pythonista #31 to crack this Bite?
It takes an average of ~36 minutes to solve this Bite (submissions 5-240 min).
Pythonistas rate this Bite 2.5 on a 1-10 difficulty scale.
» You can do it! 😌

Login and get coding
We use Python 3.7