Logging-Good

hereafter, Rails logger is your best friend 👬

Gem Build Status codecov codebeat badge

PRs Welcome Say Thanks!

Installation

gem 'logging_good'

And then execute:

$ bundle

Or install it yourself as:

$ gem install logging_good

How to use

IMPORTANT ! This gem is dependent on two other display formatting gems. Install it by adding below lines to your Gemfile

 gem "unicode-display_width", '~> 1.6'
 gem "terminal-table", '~> 1.8', '>= 1.8.0'

then run $ bundle install

So. After installing the above mentioned gems into your Gemfile, you are all set to explore this gem further...

Now, add this line into your controller action(s) to get started!

 Now.logging_good(params)

Other optional Arguments :

request
response.headers

example:

# In app/controllers/abcd_controller.rb

def index
  Now.logging_good(params, request)    
  ......
  ......
end

def create
   Now.logging_good(params)
  ......
  ......
end
  ......

That's Basically it. You are now able to see beautifully formatted data in your rails logs 🙌