Closed lcrmorin closed 1 year ago
From a purist perspective: yes!
From an educational perspective: it's tricky! I'd need to assume folks are familiar with the logging module in order for them to learn about decorators. And that's a pretty big assumption to make.
That said, what you describe is something we implemented in scikit-lego for pandas pipelines: https://scikit-lego.netlify.app/pandas_pipeline.html#Logging-in-method-chaining
In the decorator videos, you show how to use a decorator for logging. However the logger is a custom logger... wouldn't this be possible (and better) with some standard logging library ? (https://docs.python.org/3/library/logging.html)