Last active
January 14, 2016 20:45
-
-
Save adampats/eb3fae0205292e37e441 to your computer and use it in GitHub Desktop.
docker log tail loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e | |
log_files=( /home/app/log/development.log \ | |
/home/app/log/production.log ) | |
for i in ${log_files[@]}; do | |
if [[ -e $i ]]; then | |
exec tail -F $i | |
else | |
exec sleep 10 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment