Class: AuditLoggable::Logger::InternalLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/audit_loggable/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(logdev, shift_age:, shift_size:, shift_period_suffix:, timezone:) ⇒ InternalLogger

Returns a new instance of InternalLogger.



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/audit_loggable/logger.rb', line 37

def initialize(logdev, shift_age:, shift_size:, shift_period_suffix:, timezone:)
  super(nil, level: :info, formatter: JSONFormatter.new(timezone: timezone))

  return unless logdev

  @logdev =
    NoHeaderLogDevice.new(logdev,
                          shift_age: shift_age,
                          shift_size: shift_size,
                          shift_period_suffix: shift_period_suffix)
end