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