Note: I asked Tokyo iOS Meetup organizer and my nice English sensei Matt-san(@gillygize) for review and he made some suggestions. Thank you so much.
Suppose I want to outputsome a debug message on in Rails log.
I do like I can do it like this:
, but it is always hard to find that debug message in the log messages.
To make iteasy easier to find it, I always do like this.:
I know it is a dirty solution and it is super MENDOKUSAI("bothering" "bothersome" in Japanese), so I created a tiny gem that it colorizes the output of logger.debug as below:
To install it, just add the following line in your Gemfile and do "bundle install". That's it!
I personally like this simple gem, and also like that I can publish a gem from Gists. It is very handy.
The source code is available at https://gist.github.com/champierre/692b739c4fe875820f7e.
Suppose I want to output
class WelcomeController < ApplicationController
def index
logger.debug "Test"
end
end
, but it is always hard to find that debug message in the log messages.
To make it
logger.debug "*" * 80
logger.debug "Test"
I know it is a dirty solution and it is super MENDOKUSAI(
To install it, just add the following line in your Gemfile and do "bundle install". That's it!
gem 'color-log', git: 'https://gist.github.com/champierre/692b739c4fe875820f7e', group: :development
I personally like this simple gem, and also like that I can publish a gem from Gists. It is very handy.
The source code is available at https://gist.github.com/champierre/692b739c4fe875820f7e.
2016/01/08 09:00:00