Skip to content

Commit

Permalink
zsh: function for grepping bmstack logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjbray committed Nov 29, 2013
1 parent 651ed2a commit 7d0daa2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
antigen-use oh-my-zsh

antigen-bundles <<EOBUNDLES
brew
osx
rvm
tmux
vi-mode
virtualenv
vundle
zsh-users/zsh-syntax-highlighting
Expand Down Expand Up @@ -88,6 +91,15 @@ EOBUNDLES
alias fix_engine_failed="DEBUG_ENV=production \
backend/script/debug/engine_failed.py --fixall"

grep_logs() {
servers=('bmstack01' 'bmstack02')
for server in $servers; do
echo "------------[ $server ]------------"
ssh $server "sudo -u optimor grep -r $2 /var/releases/$1/current/$1/log"
echo "------------[ /$server ]------------\n"
done
}

#====[ PATH ]====

# Prioritize /usr/local/bin
Expand Down

0 comments on commit 7d0daa2

Please sign in to comment.