Class: LambdaLogFormatter
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- LambdaLogFormatter
- Defined in:
- lib/aws_lambda_ric/lambda_log_formatter.rb
Constant Summary collapse
- FORMAT =
'%<sev>s, [%<datetime>s#%<process>d] %<severity>5s %<request_id>s -- %<progname>s: %<msg>s'
Instance Method Summary collapse
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
10 11 12 13 |
# File 'lib/aws_lambda_ric/lambda_log_formatter.rb', line 10 def call(severity, time, progname, msg) (FORMAT % {sev: severity[0..0], datetime: format_datetime(time), process: $$, severity: severity, request_id: $_global_aws_request_id, progname: progname, msg: msg2str(msg)}).encode!('UTF-8') end |