neuroinformatics-unit / movement

Python tools for analysing body movements across space and time
http://movement.neuroinformatics.dev
BSD 3-Clause "New" or "Revised" License
105 stars 8 forks source link

Add console handler for logging #337

Open niksirbi opened 3 weeks ago

niksirbi commented 3 weeks ago

Our current logging configuration only adds a rotating file handler, and does not configure a console handler. This means:

What we would actually want:

To achieve this behaviour, we need to add a console handler to our logger and set the appropriate log levels for both handlers.

niksirbi commented 3 weeks ago

We could also use loguru or fancylog to reduce the amount of logging configuration we have to do on our side.

If we go with fancylog, we'd have to first address this issue.

sfmig commented 1 week ago

naive question:

is it a matter of adding a

import logging
logging.getLogger().setLevel(logging.INFO)

?

EDIT: we confirm this was indeed naive 😬

I had in my notes that this logging tutorial was useful so linking here in case it helps