Class: Logtail::Logger::MessageOnlyFormatter

Inherits:
Formatter
  • Object
show all
Defined in:
lib/logtail/logger.rb

Overview

For use in development and test environments where you do not want metadata included in the log lines.

Constant Summary

Constants inherited from Formatter

Formatter::EMPTY_ARRAY, Formatter::SEVERITY_MAP

Instance Method Summary collapse

Instance Method Details

#call(severity, timestamp, progname, msg) ⇒ Object

This method is invoked when a log event occurs



79
80
81
82
# File 'lib/logtail/logger.rb', line 79

def call(severity, timestamp, progname, msg)
  log_entry = build_log_entry(severity, timestamp, progname, msg)
  log_entry.to_s
end