Logger
It includes many features:
Provides debug, info, warn, and error levels.
Supports multiple backends which are automatically supervised when plugged into
Logger
.Formats, truncates, and alternates between async/sync when under stress to avoid clogging
Logger
backends.Integrates with Erlang's
:logger
to convert terms to Elixir syntax.Automatically includes metadata like :application, :mfa(module function and arity), :file, :line, :pid, :crash_reason etc
Advanced: Format and include more information in prod
Usage
Note the arguments given to info/2
will only be evaluated if a message is logged(its a high enough log level)
Levels, setting logger to any level will show all above too
:emergency
- when system is unusable, panics:alert
- for alerts, actions that must be taken immediately, ex. corrupted database:critical
- for critical conditions:error
- for errors:warning
- for warnings:notice
- for normal, but signifant, messages:info
- for information of any kind:debug
- for debug-related messages
Config
Last updated