Skip to content

Improve Logger's gen_event message #7928

Closed
@josevalim

Description

@josevalim

Breaking changes:

  • The timestamp should be in native units instead of a data structure
  • The metadata should be a map instead of a keyword list and we should no longer add module and function keys, furthermore file should be a charlist

These changes may also require changes to the formatter, as it receives both the old time structure and old metadata. In particular, we may want to pass the metadata keys as arguments to the formatter, instead of filtering them in the backend.

We can likely implement this today by having a flag or a function_exported? on each backend. If the new backend is used, it receives and uses the message as is. If the old backend is used, we will wrap it on another GenEvent handler and convert the old message to the new one on the fly.

We should probably start working on this around v1.12, once the Erlang's logger integration solidifies.

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