Class: AuditLoggable::Logger
- Inherits:
-
Object
- Object
- AuditLoggable::Logger
- Defined in:
- lib/audit_loggable/logger.rb
Defined Under Namespace
Classes: InternalLogger, JSONFormatter, NoHeaderLogDevice
Instance Method Summary collapse
-
#initialize(*args, **kwargs) ⇒ Logger
constructor
A new instance of Logger.
- #log(audit_record_set) ⇒ Object
Constructor Details
#initialize(*args, **kwargs) ⇒ Logger
Returns a new instance of Logger.
50 51 52 |
# File 'lib/audit_loggable/logger.rb', line 50 def initialize(*args, **kwargs) @logger = InternalLogger.new(*args, **kwargs) end |
Instance Method Details
#log(audit_record_set) ⇒ Object
54 55 56 57 58 59 60 |
# File 'lib/audit_loggable/logger.rb', line 54 def log(audit_record_set) return unless ::AuditLoggable.auditing_enabled audit_record_set.each do |audit_record| @logger.info(audit_record) end end |