Tasks for tailing Rails log files in a Mina deployment environment
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
$ 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
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request