Sha256: 360df7b52ee6dc4dabb23553f77feddee67ad286e2a478d9a7f1d06f6f595399

Contents?: true

Size: 631 Bytes

Versions: 11

Compression:

Stored size: 631 Bytes

Contents

namespace :rails do
  
  # Log rotate tasks
  namespace :logrotate do
    desc <<-DESC
    Install logrotated conf for rails.
  
    *rails_logrotate_path*: Rails logrotate path. _Defaults to <tt>{shared_path}/log/production.log</tt>_
    DESC
    task :install do
      fetch_or_default(:rails_logrotate_path, "#{shared_path}/log/production.log")
    
      set :logrotate_name, "rails_#{application}"
      set :logrotate_log_path, rails_logrotate_path
      set :logrotate_options, [ { :rotate => 7, :size => "10M" }, :daily, :missingok, :notifempty, :copytruncate ]
    
      logrotated.install_conf      
    end
  end
  
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
calas-capitate-0.3.6 lib/recipes/logrotate/rails.rb
capitate-0.2.14 lib/recipes/logrotate/rails.rb
capitate-0.2.15 lib/recipes/logrotate/rails.rb
capitate-0.2.11 lib/recipes/logrotate/rails.rb
capitate-0.2.13 lib/recipes/logrotate/rails.rb
capitate-0.3.6 lib/recipes/logrotate/rails.rb
capitate-0.3.2 lib/recipes/logrotate/rails.rb
capitate-0.3.1 lib/recipes/logrotate/rails.rb
capitate-0.3.4 lib/recipes/logrotate/rails.rb
capitate-0.3.5 lib/recipes/logrotate/rails.rb
capitate-0.3.3 lib/recipes/logrotate/rails.rb