Class: Dunlop::NestedLogger::Entry
- Inherits:
-
Object
- Object
- Dunlop::NestedLogger::Entry
- Defined in:
- app/services/dunlop/nested_logger.rb
Instance Attribute Summary collapse
-
#datetime ⇒ Object
readonly
Returns the value of attribute datetime.
-
#msg ⇒ Object
readonly
Returns the value of attribute msg.
-
#progname ⇒ Object
readonly
Returns the value of attribute progname.
-
#severity ⇒ Object
readonly
Returns the value of attribute severity.
Instance Method Summary collapse
-
#initialize(options) ⇒ Entry
constructor
A new instance of Entry.
- #to_entry ⇒ Object
Constructor Details
#initialize(options) ⇒ Entry
Returns a new instance of Entry.
145 146 147 148 149 150 |
# File 'app/services/dunlop/nested_logger.rb', line 145 def initialize() @severity = [:severity] @datetime = [:datetime] || Time.current @progname = [:progname] @msg = [:msg] end |
Instance Attribute Details
#datetime ⇒ Object (readonly)
Returns the value of attribute datetime.
143 144 145 |
# File 'app/services/dunlop/nested_logger.rb', line 143 def datetime @datetime end |
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
143 144 145 |
# File 'app/services/dunlop/nested_logger.rb', line 143 def msg @msg end |
#progname ⇒ Object (readonly)
Returns the value of attribute progname.
143 144 145 |
# File 'app/services/dunlop/nested_logger.rb', line 143 def progname @progname end |
#severity ⇒ Object (readonly)
Returns the value of attribute severity.
143 144 145 |
# File 'app/services/dunlop/nested_logger.rb', line 143 def severity @severity end |
Instance Method Details
#to_entry ⇒ Object
152 153 154 |
# File 'app/services/dunlop/nested_logger.rb', line 152 def to_entry Dunlop::NestedLogger.formatter.call(severity, datetime, progname, msg) end |