Mina-Tail

Tasks for tailing Rails log files in a Mina deployment environment

Installation

Add this line to your application's Gemfile:

gem 'mina-tail', require: false

And then execute:

$ bundle

Or install it yourself as:

$ gem install mina-tail

For support of Mina <1.0, stick with version 0.0.3 of this gem.

Require mina/tail in your config/deploy.rb:

require 'mina/tail'
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'

...

task setup: :environment do
  ...
end

Usage

$ mina production tail:live

Tails log/production.log live.

$ mina production tail:live file=unicorn.err.log

Tails log/unicorn.err.log live.

$ mina production tail:last

Returns the last 2000 lines of the log/production.log

$ mina production tail:last lines=20

Returns the last 20 lines of the log/production.log

$ mina production tail:last file=unicorn.err.log lines=20

Returns the last 20 lines of the log/unicorn.err.log

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request