Closed mjclemente closed 4 years ago
@jclausen Sorry for the bother, not trying to be a nuisance. Just wanted to see if I could get your thoughts on this, when you have the chance. Thanks!
No problem. Thanks for bumping this. In the short-term I will fix this by bumping the case on the ‘-F’ . Long-term, we have a few options that might help. Number one, though is getting Docker not to exit when we start with the ‘—console’ flag up - hence the reason we tail the physical log file.
Look for a fresh build tomorrow AM
Also hot-patched to master
branch with commit #b6ec66 . Will be available after build #254 completes: https://travis-ci.org/Ortus-Solutions/docker-commandbox/builds/657722597
Thanks! 🎉
We're seeing logging within containers disappear after a period of time. That is, logging is fine when the container is deployed, but disappears at some point during the following days.
We believe this is because CommandBox rotates the log files every 10MB or so, but the tail continues to follow the old file. We can reproduce this on development looping over
systemOutput
to fill up the log file:Currently, the tail command in this image's
run.ish
looks like this:That is, it's using a lowercase
-f
. Based on my local testing, if we switch to an uppercase-F
, tail will pickup the changed file and continue to work even after the log file is rotated.For reference, there are a few Stack posts that discuss this:
https://serverfault.com/questions/53699/continuously-monitor-logs-with-tail-that-are-occasionally-rotated https://unix.stackexchange.com/questions/22698/how-to-do-a-tail-f-of-log-rotated-files