Trying to log a missing file when repo cloned and log process starts before the Rails processes
frank184 opened this issue · 0 comments
frank184 commented
Whenever the repo is cloned from Github, log files are excluded.
The Procfile is trying to tail -f
a log file that does not exist yet.
If the log process starts before any of the Rails processes finish initializing, then the log file will be missing.
00:00:00 log.1 | tail: cannot open 'log/development.log' for reading: No such file or directory
The solution is to ensure the file exists before trying to read the file.
log: touch log/${RACK_ENV:-development}.log && tail -f log/${RACK_ENV:-development}.log