The fix is to make logger call always return a non-nil object, even when logger is set to nil in the environment configuration file (a default in production.) It might be good to include into Rails itself, so you never need to write another "if logger" line.