Sha256: d3d7a641295b016fd8e3b4ad6b0429c066682a62f3c04b19489979f6327e9483
Contents?: true
Size: 1.54 KB
Versions: 3
Compression:
Stored size: 1.54 KB
Contents
# Sentinel This is a gem for ErrorReportApi server integration. ## Installation Add this line to your application's Gemfile: ```ruby gem 'sentinel_api' ``` And then execute: $ bundle Or install it yourself as: $ gem install sentinel_api Add initializer file $ rails g sentinel_api:install Don't forget to configure your ErrorReporterAPI server uri and method ## Usage There are 3 methods, which produce 3 log level messages: info, warn, error. You can use this gem in 3 ways: * provide hash with 3 keys: message, info, tags * provide message, exception and tags - info would be made from exception's class message and backtrace * provide message and exception - no tags would be sent * provide only exception, exception message would be used, no tags ```ruby SentinelApi.info({ message: 'your custom error message', info: 'system info or other information', tags: ['tag1', 'tag2']}) SentinelApi.warn('your message', exception, ['tag1', 'tag2']) SentinelApi.error('your message', exception) ``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
logkeeper_api-0.0.4 | README.md |
logkeeper_api-0.0.3 | README.md |
logkeeper_api-0.0.2 | README.md |