'stream' and multiple logs per server

46 views
Skip to first unread message

Pharrisee

unread,
Nov 30, 2009, 10:18:13 AM11/30/09
to Capistrano
I've got a situation where I have 2 physical servers, each of which
have 2 nodes of an IBM WebSphere Portal cluster on it.

I'm using capistrano for the deployment and staging (very
successfully), and am now trying to use cap for tailing the logs on
those servers, but because each node puts it's logs into a separate
folder there are 2 logs on each server, any ideas how I could use the
cap 'stream' command in this situation?

i.e.:

appserver01:
/usr/local/IBM/appserver01/clone01/logs/SystemOut.log
/usr/local/IBM/appserver01/clone02/logs/SystemOut.log
appserver02:
/usr/local/IBM/appserver02/clone03/logs/SystemOut.log
/usr/local/IBM/appserver02/clone04/logs/SystemOut.log


normally I would do something like this:

role(:targets) {['appserver1.com','appserver2.com'}

task :viewlogs, :roles => :targets do
stream 'path to log file'
end

but in this case 'path to log file' is different on each server, and
each server has 2 of them.

Any ideas?

Thanks in advance.

Lee Hambley

unread,
Nov 30, 2009, 10:46:34 AM11/30/09
to capis...@googlegroups.com
First thought is
 
stream('tail -f  /usr/local/IBM/*/*/logs/SystemOut.log')

-- Lee Hambley

Twitter: @leehambley | @capistranorb

Pharrisee

unread,
Nov 30, 2009, 11:41:30 AM11/30/09
to Capistrano
never would have thought of that. Works well.

Thanks Lee
Reply all
Reply to author
Forward
0 new messages