Class: ActiveSupport::BufferedLogger
- Inherits:
-
Object
- Object
- ActiveSupport::BufferedLogger
- Defined in:
- lib/strawberry_log.rb
Overview
log errors in red
Instance Method Summary collapse
Instance Method Details
#debug(msg) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/strawberry_log.rb', line 14 def debug(msg) if Rails.env != :production msg = "\e[3;33m#{msg}\e[0m" end orig_debug msg end |
#error(msg) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/strawberry_log.rb', line 5 def error(msg) if Rails.env != :production msg = "\e[1;31m#{msg}\e[0m" end orig_error msg end |
#orig_debug ⇒ Object
13 |
# File 'lib/strawberry_log.rb', line 13 alias_method :orig_debug, :debug |
#orig_error ⇒ Object
4 |
# File 'lib/strawberry_log.rb', line 4 alias_method :orig_error, :error |