Sha256: ef159ced6d39eb107e220b85f8e124463ee7aa6b89fd8b58977109e0d7559f2b
Contents?: true
Size: 1.26 KB
Versions: 3
Compression:
Stored size: 1.26 KB
Contents
Capistrano::Configuration.instance.load do require_settings :current_path, :user namespace :logs do desc "See free space" task :space do run "df -alh /" end desc "Recycle log files" task :recycle do run "cd #{current_path}/log; sudo chown #{user}:#{user} *; for f in *.log; do echo '' >$f; done" end namespace :tail do desc "Watch the log files with tail" task :default do run "tail -f -q #{current_path}/log/*.log" end desc "Watch the merger files with tail" task :merger, roles: :db, on_no_matching_servers: :continue do run "tail -f -q #{current_path}/log/merger*.log" end desc "Watch the scheduler files with tail" task :scheduler, roles: :db, on_no_matching_servers: :continue do run "tail -f -q #{current_path}/log/scheduler*.log" end desc "Watch the web log files with tail" task :web, roles: :web, on_no_matching_servers: :continue do run "tail -f -q #{current_path}/log/web*.log #{current_path}/log/production*.log" end desc "Watch the worker files with tail" task :worker, roles: :worker, on_no_matching_servers: :continue do run "tail -f -q #{current_path}/log/worker*.log" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems