Class: Selenium::WebDriver::LogEntry
- Inherits:
-
Object
- Object
- Selenium::WebDriver::LogEntry
- Defined in:
- lib/selenium/webdriver/common/log_entry.rb
Instance Attribute Summary collapse
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(level, timestamp, message) ⇒ LogEntry
constructor
A new instance of LogEntry.
- #time ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(level, timestamp, message) ⇒ LogEntry
Returns a new instance of LogEntry.
23 24 25 26 27 |
# File 'lib/selenium/webdriver/common/log_entry.rb', line 23 def initialize(level, , ) @level = level @timestamp = @message = end |
Instance Attribute Details
#level ⇒ Object (readonly)
Returns the value of attribute level.
21 22 23 |
# File 'lib/selenium/webdriver/common/log_entry.rb', line 21 def level @level end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
21 22 23 |
# File 'lib/selenium/webdriver/common/log_entry.rb', line 21 def @message end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
21 22 23 |
# File 'lib/selenium/webdriver/common/log_entry.rb', line 21 def @timestamp end |
Instance Method Details
#as_json ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/selenium/webdriver/common/log_entry.rb', line 29 def as_json(*) { 'level' => level, 'timestamp' => , 'message' => } end |
#time ⇒ Object
41 42 43 |
# File 'lib/selenium/webdriver/common/log_entry.rb', line 41 def time Time.at / 1000 end |
#to_s ⇒ Object
37 38 39 |
# File 'lib/selenium/webdriver/common/log_entry.rb', line 37 def to_s "#{level} #{time}: #{}" end |