Oban.Telemetry.attach_default_logger
You're seeing just the function
attach_default_logger
, go back to Oban.Telemetry module for more information.
Specs
attach_default_logger(Logger.level()) :: :ok | {:error, :already_exists}
Attaches a default structured JSON Telemetry handler for logging.
This function attaches a handler that outputs logs with the following fields:
args
— a map of the job's raw argumentsduration
— the job's runtime duration, in the native time unitevent
— either:success
or:failure
depending on whether the job succeeded or erroredqueue
— the job's queuesource
— always "oban"system_time
— when the job started, in microsecondsworker
— the job's worker module
Examples
Attach a logger at the default :info
level:
:ok = Oban.Telemetry.attach_default_logger()
Attach a logger at the :debug
level:
:ok = Oban.Telemetry.attach_default_logger(:debug)