OSC / ood-activejobs

[MOVED] Active Jobs provides details of scheduled jobs on an HPC cluster.
https://osc.github.io/Open-OnDemand/
MIT License
0 stars 1 forks source link

Suppress "Unable to access log file" warnings #158

Closed nickjer closed 6 years ago

nickjer commented 6 years ago

The following warning appears in the NGINX error log for a production run Rails app:

App 15059 stderr: Rails Error: Unable to access log file. Please ensure that /var/www/ood/apps/sys/dashboard/log/production.log exists and is writable (ie, make it writable for user and group: chmod 0664 /var/www/ood/apps/sys/dashboard/log/production.log). The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.

This is because in RAILS_ENV=production we actually write the log to STDOUT instead of a log file. But this doesn't stop Rails from attempting to create this file and raising an error because the user doesn't have permissions.

This is a harmless warning, but may cause confusion for a sys admin. Ideally we would want to suppress this message if at all possible.