Last night the cloud-gods set our disk to read-only for about two hours, and our Rails application went down because of errors writing to app/production.log.
Is there any way to configure or otherwise duck punch the Rails logger to swallow such exceptions in the future?
I’d rather serve requests without logging them than throw errors and serve nothing.
You can use something like this, or use it to write your own logger (or even a noop one), make an instance, and assign it to
Rails.logger.