Module

Logger

Changes by version

Elixir 1.19.4

· 1 change

Bugfix Tool: Logger

Fix regression where formatter would crash when given chardata (the crash would happen when logging non-ASCII characters)

Elixir 1.19.2

· 1 change

Bugfix Tool: Logger

Reset ansi escapes before newlines in Logger

Elixir 1.19.0

· 2 changes

Enhancement Tool: Logger

Accept any enumerable in Logger.metadata/1

Hard Deprecation Tool: Logger

The :backends configuration is deprecated, either set the :default_handler to false or start backends in your application start callback

Elixir 1.17.0

· 2 changes

Enhancement Tool: Logger

Format :gen_statem reports using Elixir data structures

Enhancement Tool: Logger

Include process label in logger events

Elixir 1.16.3

· 1 change

Bugfix Tool: Logger

Ensure translators are persisted across logger restarts

Elixir 1.16.0

· 1 change

Enhancement Tool: Logger

Add Logger.levels/0

Elixir 1.15.8

· 1 change

Bugfix Tool: Logger

Ensure translators are persisted across logger restarts

Elixir 1.15.1

· 1 change

Bugfix Tool: Logger

Do not assume Logger has been loaded at compile-time

Elixir 1.15.0

· 7 changes

Enhancement Tool: Logger

Add Logger.add_handlers/1 and Logger.default_formatter/1

Enhancement Tool: Logger

Introduce default_formatter and default_handler configuration for Logger which configures Erlang/OTP logger

Enhancement Tool: Logger

Add :always_evaluate_messages configuration to Logger

Enhancement Tool: Logger

add_backend/2, remove_backend/2, and configure_backend/2 have been deprecated

Enhancement Tool: Logger

The :console configuration has been deprecated in favor of :default_formatter

Enhancement Tool: Logger

The :backends configuration has been deprecated in favor of Logger.add_handlers/1

Hard Deprecation Tool: Logger

Logger.warn/2 is deprecated in favor of Logger.warning/2

Elixir 1.14.0

· 3 changes

Enhancement Tool: Logger

Add Logger.put_process_level/2

Enhancement Tool: Logger

Deprecate Logger.enable/1 and Logger.disable/1 in favor of Logger.put_process_level/2

Hard Deprecation Tool: Logger

Deprecate $levelpad on message formatting

Elixir 1.13.0

· 3 changes

Enhancement Tool: Logger

Add Logger.put_application_level/2

Bugfix Tool: Logger

Raise clear error message for invalid :compile_time_purge_matching configuration

Bugfix Tool: Logger

Fix a bug where Logger would not reset its discard counter under some scenarios

Elixir 1.11.1

· 1 change

Bugfix Tool: Logger

Do not deadlock Logger if handler crashes on sync mode

Elixir 1.11.0

· 6 changes

Enhancement Tool: Logger

Add notice, critical, alert, and emergency log levels

Enhancement Tool: Logger

Support structured logging by logging maps or keyword lists

Enhancement Tool: Logger

Allow level to be set per module with Logger.put_module_level/2

Enhancement Tool: Logger

Include erl_level in Logger's metadata

Bugfix Tool: Logger

Print metadata for all types that implement String.Chars

Enhancement Tool: Elixir

warn log level is deprecated in favor of warning

Elixir 1.10.2

· 1 change

Bugfix Tool: Logger

Fix a bug where the Logger formatter would fail when handling unknown metadata values

Elixir 1.10.1

· 3 changes

Bugfix Tool: Logger

Properly handle the report_cb/2 option from Erlang

Bugfix Tool: Logger

Fix truncation for multi-byte characters

Bugfix Tool: Logger

Do not rebroadcast messages from remote nodes as this is now taken care by Erlang's logger

Elixir 1.10.0

· 4 changes

Enhancement Tool: Logger

Allow start_options to be configured on Logger's GenEvent

Enhancement Tool: Logger

Integrate Elixir's Logger with Erlang/OTP 21+'s logger. This means setting up the logger level in Elixir will automatically change the logger level for Erlang and vice-versa

Enhancement Tool: Logger

:compile_time_purge_level application environment configuration has been deprecated in favor of the more general :compile_time_purge_matching config

Enhancement Tool: Logger

Deprecate logging non-chardata values

Elixir 1.9.1

· 1 change

Bugfix Tool: Logger

Do not crash translator on poorly formatted supervisor names

Elixir 1.9.0

· 3 changes

Enhancement Tool: Logger

Use a decentralized mode computation for Logger which allows overloads to be detected more quickly

Enhancement Tool: Logger

Use persistent_term to store configuration whenever available for performance

Bugfix Tool: Logger

Don't discard Logger messages from other nodes as to leave a trail on both systems

Elixir 1.8.2

· 1 change

Bugfix Tool: Logger

Make sure Logger v1.8 does not get stuck in discard mode

Elixir 1.8.0

· 1 change

Bugfix Tool: Logger

Allow Logger backends to be dynamically removed when an application is shutting down

Elixir 1.7.0

· 7 changes

Enhancement Tool: Logger

Ensure nil metadata is always pruned

Enhancement Tool: Logger

Only evaluate Logger macro arguments when the message will be logged

Enhancement Tool: Logger

Add :compile_time_purge_matching to purge logger calls that match certain compile time metadata, such as module names and application names

Enhancement Tool: Logger

Log to :stderr if a backend fails and there are no other backends

Enhancement Tool: Logger

Allow translators to return custom metadata

Enhancement Tool: Logger

Return :crash_reason, :initial_call and :registered_name as metadata in crash reports coming from Erlang/OTP

Enhancement Tool: Logger

compile_time_purge_level is deprecated in favor of compile_time_purge_matching

Elixir 1.6.6

· 1 change

Bugfix Tool: Logger

Do not crash truncation when truncate is set to infinity

Elixir 1.6.0

· 1 change

Enhancement Tool: Logger

Add :discard_threshold to Logger to help with message queue overflow

Elixir 1.5.0

· 1 change

Enhancement Tool: Logger

Add metadata: :all configuration to log all metadata

Elixir 1.4.5

· 1 change

Enhancement Tool: Logger

Handle changes to crash reports in OTP 20

Elixir 1.3.3

· 1 change

Enhancement Tool: Logger

Use :ansi_color if one is available in metadata

Elixir 1.3.0

· 1 change

Enhancement Tool: Logger

Introduce Logger.reset_metadata/0,1

Elixir 1.2.5

· 2 changes

Enhancement Tool: Elixir

Stringify truncated function data in Logger

Enhancement Tool: Elixir

Ensure poorly formatted char data can also be logged by using the replacement character "�" (diamond question mark)

Elixir 1.2.0

· 1 change

Enhancement Tool: Logger

Add file to logger metadata

Elixir 1.1.0

· 5 changes

Enhancement Tool: Logger

Support printing pids and refs in Logger metadata

Enhancement Tool: Logger

Allow Logger metadata to be removed from pdict by setting it to nil

Enhancement Tool: Logger

Add application configuration translator_inspect_opts for logger to customize how state and message are formatted when translating OTP errors and reports

Enhancement Tool: Logger

Automatically include the current application in metadata when compiled via Mix

Bugfix Tool: Logger

Include metadata in Logger.log/3, use Logger.bare_log/3 for runtime-only, with no metadata behaviour

Elixir 1.0.5

· 1 change

Enhancement Tool: Elixir

Handle :undefined arity in Logger.Translator (we get :undefined when a temporary worker of a simple_one_for_one supervisor crashes)

Elixir 1.0.3

· 1 change

Enhancement Tool: Elixir

Fix logging with metadata[:function]

Elixir 1.0.0

· 1 change

Enhancement Tool: Elixir

Add Logger.enable/1 and Logger.disable/1

Elixir 0.15.1

· 7 changes

Enhancement Tool: Elixir

Add SASL log forwarding option to Logger

Enhancement Tool: Elixir

Add $padlevel to option Logger formatter

Enhancement Tool: Elixir

Backends receive the exact handler value when added, allowing a key to be passed for configuration lookup

Enhancement Tool: Elixir

Add Logger.flush/0 to flush the Logger (useful for testing)

Enhancement Tool: Elixir

Persist backends dynamically added or removed via add_backend/2 and remove_backend/2

Enhancement Tool: Elixir

Metadata is now correctly merged on each Logger.metadata/1 call

Enhancement Tool: Elixir

Use the Logger PID on :error_logger wrapper to avoid race conditions on shutdown

Elixir 0.15.0

· 1 change

Enhancement Tool: Elixir

Add Logger