Logging save lives
TL;DR:
  • My code is bad, your doesn't have to be
  • Logging vs Printing
  • Loguru
Loguru is an easy-to-understand library for Python that allows your code to have meaningful execution reports.
It was presented to me by some colleagues and i have loved it since.
I have the bad habit of over-engineer my class and i easily get lost in the execution flow.
DO NOT BE ME!
Create small interfaces, separate data classes from behavioural classes and create modular blocks one step at a time.
Print is fine, but once you go on production you realize that the print statement is insufficient.
Logging support levels help you understand where your code is going.
Levels can also be filtered based on gravity!
Loguru is a saviour tool
and it allowed me to create nice logs and save them into a log file with simple commands.
8
3 comments
Davide Lupis
4
Logging save lives
Data Alchemy
skool.com/data-alchemy
Your Community to Master the Fundamentals of Working with Data and AI — by Datalumina®
Leaderboard (30-day)
powered by