View Source Logster.Plugs.Logger (Logster v1.1.1)
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=setTo use it, just plug it into the desired module.
plug Logster.Plugs.Logger, log: :debugFor Phoenix applications, replace Plug.Logger with Logster.Plugs.Logger in the endpoint.ex file:
# plug Plug.Logger
plug Logster.Plugs.Logger
options
Options
:log- The log level at which this plug should log its request info. Default is:info.:formatter- The formatter module to use, has to implementformat/1. Default isLogster.StringFormatter.:renames- Map of fields to rename, for example:%{status: :mystatus}.:excludes- List of fields to exclude from the log, for example:[:params].