L2met::Syslog
This gem allows to write system info in log using l2met compatible format. Runs in a thread.
Installation
Add this line to your application's Gemfile:
gem 'l2met-syslog'
And then execute:
$ bundle
Or install it yourself as:
$ gem install l2met-syslog
Usage
class MyLogger < L2met::Syslogger
def log_data
log(source: ENV['APP_NAME'], measure: 'cpu', val: 10)
log(source: ENV['APP_NAME'], measure: 'memory', val: 100)
end
end
# this will start logging data in a new thread
MyLogger.run
Contributing
- 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