If you do printf debugging, this adds pretty colors and only shows for the user requesting the logging
# if you want to customize, redefine in initializers
# passenger does not define ENV['USER']
USER=ENV['HOME'].split('/').last
#usage: my_log 'kbrock', 'UserController#logout', name
#only for me, will log
def my_log(*args)
who=args.shift #determine who wants to see this
if who.nil? || who == USER
theme=args.shift
params = args.join ' ' || ''
params += ' ' + yield if block_given?
message="\e[1;34m#{theme}\e[0m #{params}"
Rails.logger.debug(message)
puts(message) unless Rails.env.test?
end
end