tryolabs / norfair

Lightweight Python library for adding real-time multi-object tracking to any detector.
https://tryolabs.github.io/norfair/
BSD 3-Clause "New" or "Revised" License
2.34k stars 237 forks source link

Configure logging behavior? #314

Open utility-aagrawal opened 3 months ago

utility-aagrawal commented 3 months ago

Hi,

Is there an option to configure logging behavior? I am using norfair within my python script. I am directing all my logs to a log file from my script but some warnings/logs are still written to the console. I suspect this is happening from warning/logs from norfair. Is there an option to control this behavior? I want all my logs to go to the log file. Thanks!

utility-aagrawal commented 3 months ago

I tested some more and now I am sure it happens only when my input meets with a norfair warning. I am using motion estimator and sometimes my input will cause the following warning:

WARNING:root:The homography couldn't be computed in this frame due to low amount of points

As soon as my script hits this warning, all the subsequent logs/warnings get printed in console, instead of going to my log file. Let me know your feedback on this please. Thanks!

utility-aagrawal commented 1 week ago

@aguscas , can you please comment on this?