Introduce an option to enable debug logging. This would emit logging at each middleware invocation, useful for debugging.