Sha256: e4e34daa1f34e522a434e617908ac6accbba4c74535bcde38a7eeca6ab9fdaa2

Contents?: true

Size: 1.64 KB

Versions: 1

Compression:

Stored size: 1.64 KB

Contents

Yogi Berra
==========

 "If the world were perfect, it wouldn't be." - Yogi Berra

Yogi Berra was the best catcher of all time.
This gem will catch all of your rails error in production or development and store them in mongodb if
it can. It uses the mongodb_ruby_driver in a non-blocking way.

    Mongo::MongoClient.new(host, port, :w => 0)

The `:w => 0` option here makes requests to the mongodb server not wait for a response.
This will begin to fill a buffer when there is no connection. When the connection returns
the buffer will be entered into the database. There can be data loss if the buffer overflows.
There are some messages in the logs which will tell you if the connection is down.
This makes the catcher work when it does and not crash or slow when it doesn't.

Installation
------------

add yogi_berra to your Gemfile:

    gem 'yogi_berra'

Create a yogi.yml file in rails root config/ folder. Here is a sample:

    defaults: &defaults
      username: yogi
      password: berra

    development:
      <<: *defaults
      database: yogi_berra
      host: localhost
      port: 27017

Thanks
------

To :
  - Thoughtbot Airbrake:
    https://github.com/airbrake/airbrake/tree/master/lib/airbrake
    This gem is awesome and was the base for most of the code here.

  - Exception Engine:
    https://github.com/Consoci8/exception_engine
    Which is an app which was the inital fork to start this code base.
    Just took out the need for mongoid, and a rails app. Made it into a gem
    that will later have a rails app to view the exceptions. Exception engine also
    credits Thoughtbot for the Hoptoad::Notice part of the code. Hoptoad is now airbrake.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yogi_berra-0.0.1 README.md