In this recipe, we made good use of Python's built-in __main__ self-testing section. We introduced our own logging file and, at the same time, learned how to create different logging levels. By doing this, we have full control over what gets written to our log files.