My advice in such cases is:
- Spend time and try to think of a possible error.
- Narrow the log down to the domain which, as you think, might be buggy. If possible, disable all other logging so it doesn’t consume priceless time.
- Simplify log: print inputs, outputs and actions done.
- Repeat until you find the error in function output.
This reduces cognitive load down to a minimum and allows to finally read all important actions.
This works best if the final execution takes under 1s, or at most 10s.