ruby - How to print capistrano current thread hash? -


an example output capistrano:

info [94db8027] running /usr/bin/env uptime on leehambley@example.com:22 debug [94db8027] command: /usr/bin/env uptime debug [94db8027]   17:11:17 50 days, 22:31,  1 user,  load average: 0.02, 0.02, 0.05 info [94db8027] finished in 0.435 seconds command successful. 

as can see, each line starts "{type} {hash}". assume hash unique identifier either server or running thread, i've noticed if run capistrano on several servers, each 1 has it's own distinct hash.

my question is, how value? want manually output message during execution, , want able match output, server triggered it.

something like: puts "debug ["+????+"] happened!" put in ???? there? or there another, built in way output messages this?

for reference, using capistrano version: 3.2.1 (rake version: 10.3.2)

hash command uuid. tied not server specific command run.

if want distinguish between servers may try following

task :some_task   on roles(:app) |host|     debug "[#{host.hostname}:#{host.port}] happened"   end end 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -