Logging boilerplate can make adding logging to your code more complex. One workaround is to wrap up your logging code in a decorator. Then, you can add a decorator to any functions that you want to add logging to.
This chapter will cover the following topics:
What is a decorator?
Creating an exception logging decorator
Passing a logger to a decorator
You wil…


