Class: EasyMapper::Logger
- Inherits:
-
Object
- Object
- EasyMapper::Logger
- Defined in:
- lib/easy_mapper/logger.rb
Class Attribute Summary collapse
-
.device ⇒ Object
writeonly
Sets the attribute device.
-
.level ⇒ Object
writeonly
Sets the attribute level.
Class Method Summary collapse
Class Attribute Details
.device=(value) ⇒ Object
Sets the attribute device
6 7 8 |
# File 'lib/easy_mapper/logger.rb', line 6 def device=(value) @device = value end |
.level=(value) ⇒ Object
Sets the attribute level
6 7 8 |
# File 'lib/easy_mapper/logger.rb', line 6 def level=(value) @level = value end |
Class Method Details
.logger ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/easy_mapper/logger.rb', line 11 def logger unless @logger @logger = ::Logger.new device @logger.level = ::Logger.const_get(level) @logger.datetime_format = '%Y-%m-%d %H:%M:%S ' end @logger end |