Sha256: 78f68b6280a0cf995c741e0765003ef75a6b303436fba4c3cc3c19a5e33a7087

Contents?: true

Size: 582 Bytes

Versions: 17

Compression:

Stored size: 582 Bytes

Contents

## log.rb
#
# Dynamically adds log task based on log definitions
namespace :log do

  fetch(:negroku_logs, {}).each do |namespace, log|

    namespace namespace do

      log.each do |name, path|

        desc "Show #{namespace} #{name} log tail"
        task name, :lines do |t, args|
          on release_roles [:app, :web] do
            within current_path do
              args.with_defaults(:lines => 10)
              execute :tail, '-f', Pathname.new(shared_path).join("log", path), "-n", args[:lines]
            end
          end
        end

      end
    end
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
negroku-2.3.4 lib/negroku/tasks/log.rake
negroku-2.3.3 lib/negroku/tasks/log.rake
negroku-2.3.2 lib/negroku/tasks/log.rake
negroku-2.3.1 lib/negroku/tasks/log.rake
negroku-2.3.0 lib/negroku/tasks/log.rake
negroku-2.2.0 lib/negroku/tasks/log.rake
negroku-2.1.0 lib/negroku/tasks/log.rake
negroku-2.0.3 lib/negroku/tasks/log.rake
negroku-2.0.2 lib/negroku/tasks/log.rake
negroku-2.0.1 lib/negroku/tasks/log.rake
negroku-2.0.0 lib/negroku/tasks/log.rake
negroku-2.0.0.pre7 lib/negroku/tasks/log.rake
negroku-2.0.0.pre6 lib/negroku/tasks/log.rake
negroku-2.0.0.pre5 lib/negroku/tasks/log.rake
negroku-2.0.0.pre4 lib/negroku/tasks/log.rake
negroku-2.0.0.pre3 lib/negroku/tasks/log.rake
negroku-2.0.0.pre2 lib/negroku/tasks/log.rake