It seems to me you've nailed down two possible ways to solve the problem.
Configure the logger so that it doesn't show what you don't want to see with a filter. This seems to be the best, you just need to make sure the scope of your instances/variables (notably the filter) can be reached.
Traceback the logs before they are printed out. This might work but you'll probably need a lot of compute if you want to reach non consecutive logs.
Hope this helps!