Sha256: 5e38b85ccbc0f10777b3489ecd82814036f2f121eb07e7b025459417af53277b

Contents?: true

Size: 452 Bytes

Versions: 8

Compression:

Stored size: 452 Bytes

Contents

Capistrano::Configuration.instance.load do
  set(:pattern, '')
  set(:all_logs, false)

  namespace :syslog do
    desc "Grep the sys"
    task :grep do
      syslogs_name = if all_logs
        '/var/log/syslog*'
      else
        '/var/log/syslog'
      end

      if pattern.to_s.strip != ''
        sudo "zgrep -E #{pattern} #{syslogs_name}"
      else
        fail "No pattern specified, please use -s pattern=PATTERN"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
elocal_capistrano-1.0.8 lib/elocal_capistrano/syslog.rb
elocal_capistrano-1.0.7 lib/elocal_capistrano/syslog.rb
elocal_capistrano-1.0.5 lib/elocal_capistrano/syslog.rb
elocal_capistrano-1.0.4 lib/elocal_capistrano/syslog.rb
elocal_capistrano-1.0.3 lib/elocal_capistrano/syslog.rb
elocal_capistrano-1.0.2 lib/elocal_capistrano/syslog.rb
elocal_capistrano-1.0.1 lib/elocal_capistrano/syslog.rb
elocal_capistrano-1.0.0 lib/elocal_capistrano/syslog.rb