TandoorRecipes / recipes

Application for managing recipes, planning meals, building shopping lists and much much more!
https://docs.tandoor.dev
Other
5.56k stars 589 forks source link

enable logging for whole project and add more logging to connectors #3215

Closed mikhail5555 closed 3 months ago

mikhail5555 commented 4 months ago

required for #3213

Adds logging in the following format:

Thread-1 (worker) DEBUG 2024-07-10 11:15:22,820 recipes.connector.worker received item.instance=<ShoppingListEntry: Shopping list entry 77> with item.actionType=<ActionType.CREATED: 1>
Thread-1 (worker) DEBUG 2024-07-10 11:15:22,826 recipes.connector.worker running 1 connectors for item.instance=<ShoppingListEntry: Shopping list entry 77> with item.actionType=<ActionType.CREATED: 1>
Thread-1 (worker) DEBUG 2024-07-10 11:15:22,826 recipes.connector.homeassistant.test adding item='4'
vabene1111 commented 4 months ago

ok thank you, will get this merged for a intermediate release. Do you want to add some docs for the log level setting? I should probably use the logging framework for all kinds of debug/logging stuff anyway.

mikhail5555 commented 4 months ago

ok thank you, will get this merged for a intermediate release. Do you want to add some docs for the log level setting? I should probably use the logging framework for all kinds of debug/logging stuff anyway.

If you want, also, do you want me to keep DJANGO_LOG_LEVEL or just change it to LOG_LEVEL which might be a bit more common?

vabene1111 commented 4 months ago

I think LOG_LEVEL makes the most sense.

mikhail5555 commented 3 months ago

I think LOG_LEVEL makes the most sense.

Let me know when this can get merged so i can debug the issue!

vabene1111 commented 3 months ago

sorry for the long wait, got it merged into develop. If you want to debug with people they can switch from master to develop, there are currently no breaking changes or migrations or anything planned, they are safe to downgrade afterwards. Maybe this way we can get the fix into the same release :)

thanks for trying to fix this.