tools: Add callback based filtering for logfile dump