Class: Rack::Insight::LogPanel::LogEntry
- Inherits:
-
Object
- Object
- Rack::Insight::LogPanel::LogEntry
- Defined in:
- lib/rack/insight/panels/log_panel.rb
Constant Summary collapse
- LEVELS =
['DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL']
Instance Attribute Summary collapse
-
#level ⇒ Object
readonly
TODO: Update this to the Rack::Insight panel format.
-
#message ⇒ Object
readonly
TODO: Update this to the Rack::Insight panel format.
-
#time ⇒ Object
readonly
TODO: Update this to the Rack::Insight panel format.
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)
TODO: Update this to the Rack::Insight panel format
5 6 7 |
# File 'lib/rack/insight/panels/log_panel.rb', line 5 def level @level end |
#message ⇒ Object (readonly)
TODO: Update this to the Rack::Insight panel format
5 6 7 |
# File 'lib/rack/insight/panels/log_panel.rb', line 5 def @message end |
#time ⇒ Object (readonly)
TODO: Update this to the Rack::Insight panel format
5 6 7 |
# File 'lib/rack/insight/panels/log_panel.rb', line 5 def time @time end |
Instance Method Details
#cleaned_message ⇒ Object
14 15 16 |
# File 'lib/rack/insight/panels/log_panel.rb', line 14 def @message.to_s.gsub(/\e\[[;\d]+m/, "") end |