add special logic for rewriting log-slow-queries