Class: Lumberjack::Device::DateRollingLogFile Deprecated
- Inherits:
-
LogFile
- Object
- Lumberjack::Device
- Writer
- LogFile
- Lumberjack::Device::DateRollingLogFile
- Defined in:
- lib/lumberjack/device/date_rolling_log_file.rb
Overview
Deprecated.
Use Lumberjack::Device::LogFile
Deprecated device. Use LogFile instead.
Constant Summary
Constants inherited from Writer
Writer::EDGE_WHITESPACE_PATTERN
Instance Attribute Summary
Attributes inherited from Writer
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ DateRollingLogFile
constructor
A new instance of DateRollingLogFile.
Methods inherited from LogFile
Methods inherited from Writer
#close, #datetime_format, #datetime_format=, #dev, #flush, #path, #write
Methods inherited from Lumberjack::Device
#close, #datetime_format, #datetime_format=, #dev, #flush, open_device, #reopen, #write
Constructor Details
#initialize(path, options = {}) ⇒ DateRollingLogFile
Returns a new instance of DateRollingLogFile.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/lumberjack/device/date_rolling_log_file.rb', line 10 def initialize(path, = {}) Utils.deprecated("Lumberjack::Device::DateRollingLogFile", "Lumberjack::Device::DateRollingLogFile is deprecated and will be removed in version 2.1; use Lumberjack::Device::LogFile instead.") unless [:roll]&.to_s&.match(/(daily)|(weekly)|(monthly)/i) raise ArgumentError.new("illegal value for :roll (#{[:roll].inspect})") end = .reject { |k, _| k == :roll }.merge(shift_age: [:roll].to_s.downcase) super(path, ) end |