Logster v0.3.0 Logster.Plugs.Logger

A plug for logging request information in the format:

method=GET path=/articles/some-article format=html controller=HelloPhoenix.ArticleController action=show params={"id":"some-article"} status=200 duration=0.402 state=set

To use it, just plug it into the desired module.

plug Logster.Plugs.Logger, log: :debug

For Phoenix applications, replace Plug.Logger with Logster.Plugs.Logger in the endpoint.ex file:

# plug Plug.Logger
plug Logster.Plugs.Logger

Options

  • :log - The log level at which this plug should log its request info. Default is :info.

Summary

Functions

call(conn, opts)
do_filter_params(struct, params_to_filter)
init(opts)