Sha256: fe31bea8c2f55b339b3b81654c5298f3c409849358f085a923b3a321ec985522

Contents?: true

Size: 1.07 KB

Versions: 19

Compression:

Stored size: 1.07 KB

Contents

Capistrano::Configuration.instance(:must_exist).load do

  namespace :slice do
    desc "Tail the Rails logs for your environment"
    task :tail_environment_logs, :roles => :app do
      run "tail -f #{shared_path}/log/#{rails_env}.log" do |channel, stream, data|
        puts  # for an extra line break before the host name
        puts "#{channel[:server]} -> #{data}" 
        break if stream == :err    
      end
    end
    desc "Tail the Mongrel logs for your environment"
    task :tail_mongrel_logs, :roles => :app do
      run "tail -f #{shared_path}/log/mongrel*.log" do |channel, stream, data|
        puts  # for an extra line break before the host name
        puts "#{channel[:server]} -> #{data}" 
        break if stream == :err    
      end
    end
    desc "Tail the apache logs for your environment"
    task :tail_apache_logs, :roles => [:app, :web] do
      run "tail -f /var/log/apache2/#{application}.*.access.log" do |channel, stream, data|
        puts # line break
        puts "#{channel[:server]} -> #{data}"
        break if stream == :err
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
eycap-0.6.12 lib/eycap/recipes/slice.rb
eycap-0.6.11 lib/eycap/recipes/slice.rb
eycap-0.6.10 lib/eycap/recipes/slice.rb
eycap-0.6.9 lib/eycap/recipes/slice.rb
eycap-0.6.8 lib/eycap/recipes/slice.rb
eycap-0.6.7 lib/eycap/recipes/slice.rb
eycap-0.6.6 lib/eycap/recipes/slice.rb
eycap-0.6.5 lib/eycap/recipes/slice.rb
eycap-0.6.4 lib/eycap/recipes/slice.rb
eycap-0.6.3 lib/eycap/recipes/slice.rb
eycap-0.6.2 lib/eycap/recipes/slice.rb
eycap-0.6.1 lib/eycap/recipes/slice.rb
eycap-0.6.0 lib/eycap/recipes/slice.rb
eycap-0.5.23 lib/eycap/recipes/slice.rb
eycap-0.5.22 lib/eycap/recipes/slice.rb
eycap-0.5.21 lib/eycap/recipes/slice.rb
eycap-0.5.20 lib/eycap/recipes/slice.rb
eycap-0.5.19 lib/eycap/recipes/slice.rb
eycap-0.5.18 lib/eycap/recipes/slice.rb