hereafter, Rails logger is your best friend 👬
And then execute:
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
gem "unicode-display_width", '~> 1.6' gem "terminal-table", '~> 1.8', '>= 1.8.0'
$ 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!
Other optional Arguments :
# 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 🙌