Class: Insight::LogPanel::LogEntry
- Inherits:
-
Object
- Object
- Insight::LogPanel::LogEntry
- Defined in:
- lib/insight/panels/log_panel.rb
Constant Summary
- LEVELS =
['DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL']
Instance Attribute Summary (collapse)
-
- (Object) level
readonly
Returns the value of attribute level.
-
- (Object) message
readonly
Returns the value of attribute message.
-
- (Object) time
readonly
Returns the value of attribute time.
Instance Method Summary (collapse)
- - (Object) cleaned_message
-
- (LogEntry) initialize(level, time, message)
constructor
A new instance of LogEntry.
Constructor Details
- (LogEntry) initialize(level, time, message)
A new instance of LogEntry
7 8 9 10 11 |
# File 'lib/insight/panels/log_panel.rb', line 7 def initialize(level, time, ) @level = LEVELS[level] @time = time @message = end |
Instance Attribute Details
- (Object) level (readonly)
Returns the value of attribute level
4 5 6 |
# File 'lib/insight/panels/log_panel.rb', line 4 def level @level end |
- (Object) message (readonly)
Returns the value of attribute message
4 5 6 |
# File 'lib/insight/panels/log_panel.rb', line 4 def @message end |
- (Object) time (readonly)
Returns the value of attribute time
4 5 6 |
# File 'lib/insight/panels/log_panel.rb', line 4 def time @time end |
Instance Method Details
- (Object) cleaned_message
13 14 15 |
# File 'lib/insight/panels/log_panel.rb', line 13 def @message.to_s.gsub(/\e\[[;\d]+m/, "") end |