Logger
Last updated
Last updated
It includes many features:
Provides debug, info, warn, and error levels.
Supports multiple backends which are automatically supervised when plugged into .
Formats, truncates, and alternates between async/sync when under stress to avoid clogging backends.
Integrates with Erlang's 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
Note the arguments given to 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