Fix nil error in the case when Rails.logger is nil