Skip to content

Lack of documentation when Logger.Formatter drops metadata due to unmeet printable conditions #13772

@Krapaince

Description

@Krapaince

Elixir and Erlang/OTP versions

Erlang/OTP 26 [erts-14.1.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit:ns]

Elixir 1.17.2 (compiled with Erlang/OTP 26)

Operating system

any

Current behavior

The Logger.Formatter silently removes metadata that doesn't meet printable condition.

Expected behavior

There is nothing wrong with this behavior, but following my experience of why my metadata wasn't printed:

I did multiple back and forth between my code and the documentation to find out if I had done something wrong in the configuration, or the Logger.metadata/1 but didn't found anything.
I end up in searching on the elixir forum to find this thread which lead me to link mentioned in the Current behavior section above.

I wonder if we could add to the Logger.Formatter's documentation the conditions that a metadata value must meet in order to be printed. In 1.17.2 the Metadata section is kind of empty on that matter

image

and so is the Logger's Metadata section but I don't know if it should be putted there over the Logger.Formatter page.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions