meta_logger
meta_logger copied to clipboard
A wrapper for Elixir Logger that keeps and returns the logger metadata from the caller processes.
There is a single fixed log format for the [`Tesla.Middleware.MetaLogger`](https://hexdocs.pm/meta_logger/Tesla.Middleware.MetaLogger.html) (and in fact not well-documented). Request ``` [{tag}] {HTTP method} {URL} {headers} [{tag}] {body} ``` Response: ``` [{tag}] {HTTP status...
Commonly a prefix is used in log messages. For example: ```elixir [ "[", inspect(__MODULE__), "] My info message." ] |> Miss.String.build() |> MetaLogger.info() # => [MyModule] My info message. ```...
Some scenarios might require a particular way of slicing the entries, for example, ensuring that each slice is valid UTF-8. This would be a requirement if the entries are later...
When the body of a request is larger than the `max_entry_length` we slice the entry and log each portion separately. This adds a test to verify that the metadata is...