Check more gently for presence of request.logger

This line crashed with a message like "no such method req.logger" in an old rails (2.3.5) project.  The new version should do what was intended in the original code.