Luger v1.0.2 Luger

A plug for logging basic request information in the format:

17:26:06.192 [info]  POST /path - 200 - 794µs - 127.0.0.1

Options

  • :include_ip - Whether or not to include the remote_ip field in the log message. Default is true.
  • :level - The log level at which this plug should log its request info. Default is :info.

Summary

Functions

Called on each request, triggers a log to happen on send

Initializes the logger by creating a struct containing options

Types

t()
t

Functions

call(conn, opts)
call(conn :: Conn.t, level :: atom) :: conn :: Conn.t

Called on each request, triggers a log to happen on send.

create(conn, duration, opts)

See Luger.Message.create/3.

init(options \\ [])
init(options :: Keyword.t) :: level :: atom

Initializes the logger by creating a struct containing options.

join(message)

See Luger.Message.join/1.

split(message)

See Luger.Message.split/1.