Make logger work in Rails 4

I am not 100% sure if this will also work for older versions