Class: ScoutLogger
- Inherits:
-
Logger
- Object
- Logger
- ScoutLogger
- Defined in:
- lib/es-scout/scout_logger.rb
Instance Attribute Summary collapse
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
Instance Method Summary collapse
-
#add(severity, message = nil, progname = nil, &block) ⇒ Object
this is the method that ultimately gets called whenever you invoke info, debug, etc.
-
#initialize(*args) ⇒ ScoutLogger
constructor
A new instance of ScoutLogger.
Constructor Details
#initialize(*args) ⇒ ScoutLogger
Returns a new instance of ScoutLogger.
9 10 11 12 |
# File 'lib/es-scout/scout_logger.rb', line 9 def initialize(*args) @messages=[] super end |
Instance Attribute Details
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
7 8 9 |
# File 'lib/es-scout/scout_logger.rb', line 7 def @messages end |
Instance Method Details
#add(severity, message = nil, progname = nil, &block) ⇒ Object
this is the method that ultimately gets called whenever you invoke info, debug, etc.
15 16 17 18 |
# File 'lib/es-scout/scout_logger.rb', line 15 def add(severity, =nil, progname = nil, &block) @messages << "[#{Time.now.strftime('%Y-%m-%d %H:%M:%S ')} ##{$$}] : #{progname}" super end |