Correctly set middleware log keys.