Timber v1.1.10 Timber.Events.HTTPServerResponseEvent

The HTTPServerResponseEvent tracks responses for incoming HTTP requests. In other words, the resposnes you are sending back to your clients. This gives you structured insight into the response you are sending back to your clients.

Timber can automatically track response events if you use a Plug based framework through Timber.Plug.

Summary

Functions

Message to be used when logging

Builds a new struct taking care to

Types

t()
t() :: %Timber.Events.HTTPServerResponseEvent{body: String.t | nil, headers: map, request_id: Strin.t | nil, status: pos_integer, time_ms: float}

Functions

message(h_t_t_p_server_response_event)
message(t) :: IO.chardata

Message to be used when logging.

new(opts)
new(Keyword.t) :: t

Builds a new struct taking care to:

  • Truncate the body if it is too large.
  • Normalize header values so they are consistent.
  • Removes “” or nil values.