Skip to content

Instantly share code, notes, and snippets.

@adampats
Last active January 14, 2016 20:45
Show Gist options
  • Save adampats/eb3fae0205292e37e441 to your computer and use it in GitHub Desktop.
Save adampats/eb3fae0205292e37e441 to your computer and use it in GitHub Desktop.
docker log tail loop
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