Sha256: 0c1466d5c1cc6c003440cd9badf6da1d727a74603e8b2a76f26c24b1becfdcbd

Contents?: true

Size: 1.15 KB

Versions: 16

Compression:

Stored size: 1.15 KB

Contents

# Conventient tasks for remotely tail'ing log files.
# Available logs that can be streamed out of the box:
#
#  * production.log (your application's production log)
#  * torquebox.log (your torquebox log)
#  * <application>-nginx-access.log (the nginx access log specific to <application> only.)
#  * <application>-nginx-error.log (the nginx error log specific to <application> only.)

namespace :log do
  desc "Stream (tail) the application's production log."
  task :app do
    trap("INT") { puts 'Exit'; exit 0; }
    stream "tail -f '#{shared_path}/log/production.log'"
  end

  desc "Stream (tail) the nginx access log."
  task :nginx_access do
    trap("INT") { puts 'Exit'; exit 0; }
    stream "tail -f '/home/#{fetch(:user)}/log/#{fetch(:application)}-nginx-access.log'"
  end

  desc "Stream (tail) the nginx error log."
  task :nginx_error do
    trap("INT") { puts 'Exit'; exit 0; }
    stream "tail -f '/home/#{fetch(:user)}/log/#{fetch(:application)}-nginx-error.log'"
  end

  desc "Stream (tail) the unicorn error log."
  task :unicorn_error do
    trap("INT") { puts 'Exit'; exit 0; }
    stream "tail -f '#{fetch(:current_path)}/log/unicorn-error.log'"
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
negroku-1.1.2 lib/negroku/tasks/log.rb
negroku-1.1.1 lib/negroku/tasks/log.rb
negroku-1.1.0 lib/negroku/tasks/log.rb
negroku-1.0.0 lib/negroku/tasks/log.rb
negroku-0.0.12 lib/negroku/tasks/log.rb
negroku-0.0.11 lib/negroku/tasks/log.rb
negroku-0.0.10 lib/negroku/tasks/log.rb
negroku-0.0.9 lib/negroku/tasks/log.rb
negroku-0.0.8 lib/negroku/tasks/log.rb
negroku-0.0.7 lib/negroku/tasks/log.rb
negroku-0.0.6 lib/negroku/tasks/log.rb
negroku-0.0.5 lib/negroku/tasks/log.rb
negroku-0.0.4 lib/negroku/tasks/log.rb
negroku-0.0.3 lib/negroku/tasks/log.rb
negroku-0.0.2 lib/negroku/tasks/log.rb
negroku-0.0.1 lib/negroku/tasks/log.rb