Showing logs with tail command directly to airbrussh formatter
AlfredoRoca opened this issue · 2 comments
AlfredoRoca commented
I have this rake task:
namespace :logs do
desc "tail rails log"
task :tail_rails do
on roles(:app) do
execute "tail -f #{shared_path}/log/#{fetch(:rails_env)}.log"
end
end
end
This task tails production rails log if set :format, :pretty
in deploy.rb
But without any format specified and gem airbrussh formatting capistrano output, the task doesn't show anything. capistrano.log is getting the log correctly.
It would be nicer to have the log through airbrussh.
Is there any config to do that?
Great job!
Alfredo.
robd commented
Hey @AlfredoRoca
I think config.command_output = :stdout
is what you're after:
# You can control whether airbrussh shows the output of SSH commands. For
# brevity, the output is hidden by default.
#
# Display stdout of SSH commands. Stderr is not displayed.
# config.command_output = :stdout
#
# Display stderr of SSH commands. Stdout is not displayed.
# config.command_output = :stderr
#
# Display all SSH command output.
# config.command_output = [:stdout, :stderr]
# or
# config.command_output = true
#
# Default (all output suppressed):
config.command_output = false
AlfredoRoca commented
Thanks. It worked. I needed more reading :-)