Class: Shoryuken::Logging::WithoutTimestamp

Inherits:
Base
  • Object
show all
Defined in:
lib/shoryuken/logging/without_timestamp.rb

Overview

A log formatter that excludes timestamps from output. Useful for environments where timestamps are added by external logging systems.

Output format: “pid=PID tid=THREAD_ID CONTEXT SEVERITY: MESSAGE”

Examples:

Output

pid=12345 tid=abc123 MyWorker/queue1/msg-456 INFO: Processing message

Instance Method Summary collapse

Methods inherited from Base

#context, #tid

Instance Method Details

#call(severity, _time, _program_name, message) ⇒ String

Formats a log message without timestamp information.

Parameters:

  • severity (String)

    Log severity level (DEBUG, INFO, WARN, ERROR, FATAL)

  • _time (Time)

    Timestamp (unused)

  • _program_name (String)

    Program name (unused)

  • message (String)

    The log message

Returns:

  • (String)

    Formatted log entry with newline



20
21
22
# File 'lib/shoryuken/logging/without_timestamp.rb', line 20

def call(severity, _time, _program_name, message)
  "pid=#{Process.pid} tid=#{tid}#{context} #{severity}: #{message}\n"
end