Sha256: cda009e0a332f957ec852acf87b4b4eccc98cd47301bc8d06dca46e01a593647
Contents?: true
Size: 950 Bytes
Versions: 8
Compression:
Stored size: 950 Bytes
Contents
# Paul Bunyan (formerly: Logging) PaulBunyan is a re-usable component with a globally accessible Logger with extra support for handling logging in Rails. ``` class Foo include PaulBunyan def bar logger.warn "blah" end end ``` Also included is a Railtie that overrides the default rails logger to always print to STDOUT as well as format the messages to JSON for machine readable goodness. This has been tested with Rails 4.2 but should compatible with Rails 3 or newer since that's when Railties were introduced. ## Installation Add this line to your application's Gemfile: gem 'paul_bunyan' And then execute: $ bundle Or install it yourself as: $ gem install paul_bunyan ## Usage ### Non-Rails projects: ``` require 'paul_bunyan' include PaulBunyan::Logger PaulBunyan.set_logger(STDOUT) logger.warn "blah" ``` ### Rails projects: Nothing after it's added to your Gemfile, the Railtie takes care of the rest.
Version data entries
8 entries across 8 versions & 1 rubygems