lib/prosopite.rb in prosopite-0.1.7 vs lib/prosopite.rb in prosopite-0.2.0
- old
+ new
@@ -138,19 +138,23 @@
notifications_str << " #{f}\n" unless f.include?(Bundler.bundle_path.to_s)
end
notifications_str << "\n"
end
- Rails.logger.warn(notifications_str) if @rails_logger
- $stderr.puts(notifications_str) if @stderr_logger
+ Rails.logger.warn(red(notifications_str)) if @rails_logger
+ $stderr.puts(red(notifications_str)) if @stderr_logger
if @prosopite_logger
File.open(File.join(Rails.root, 'log', 'prosopite.log'), 'a') do |f|
f.puts(notifications_str)
end
end
raise NPlusOneQueriesError.new(notifications_str) if @raise
+ end
+
+ def red(str)
+ "\e[91m#{str}\e[0m\n"
end
def subscribe
@subscribed ||= false
return if @subscribed