Ruby logging library that provides the ability to add class/module specific filters
View the Project on GitHub gshutler/hatchet
Hosted on GitHub Pages — Theme by orderedlist
Add this line to your application’s Gemfile:
And then execute:
$ bundle
If you are using Bundler to require your gems then Hatchet should now be available. Otherwise, you will need to require the Hatchet gem explicitly:
First you must install the gem:
$ gem install hatchet
Then you must require the gem from with your application:
To make Hatchet’s logging method available within a class you must include the Hatchet module:
To make Hatchet’s logging method available within a module you must extend the module with Hatchet:
Hatchet can also be used with scripts by including the Hatchet module at the top level:
Configuration is done via the standard configuration mechanism. Where this is done depends on how you have laid out your application but you should ensure that Hatchet is configured before you try and use it to log messages.