Class: PactBroker::Webhooks::WebhookRequestLogger::Formatter
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- PactBroker::Webhooks::WebhookRequestLogger::Formatter
- Defined in:
- lib/pact_broker/webhooks/webhook_request_logger.rb
Constant Summary collapse
- Format =
"[%s] %s: %s\n".freeze
Instance Method Summary collapse
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
16 17 18 |
# File 'lib/pact_broker/webhooks/webhook_request_logger.rb', line 16 def call(severity, time, progname, msg) Format % [format_datetime(time), severity, msg2str(msg)] end |
#format_datetime(time) ⇒ Object
20 21 22 |
# File 'lib/pact_broker/webhooks/webhook_request_logger.rb', line 20 def format_datetime(time) time.strftime(@datetime_format || "%Y-%m-%dT%H:%M:%SZ".freeze) end |