Sooner-Rover-Team / Autonomous

Utilities for controlling the rover - autonomously!
MIT License
0 stars 5 forks source link

Replace `print` with `logging` #1

Open onkoe opened 9 months ago

onkoe commented 9 months ago

Currently, we use print to debug our programs. We shouldn't do that, as it can affect how our program runs in competition. It may also make it harder for Autonomous to see useful information.

Implementations

However, Python doesn't really have an incredible de-facto logging library. logging is pretty close, but it lacks simple features like colored output.

Here's a list of common libs with some info about them.

Logging

Pros:

Cons:

loguru: logging, with better defaults

Pros:

Cons:

picologging

It's a drop-in replacement for logging. The only difference is that it's significantly faster! See the logging section for more info.

onkoe commented 2 months ago

actually progressed on this in #7 🥹