Plug Logger JSON v0.1.0 Plug.LoggerJSON
A plug for logging basic request information in the format:
{
"api_version": "N/A"
"client_ip": "23.235.46.37"
"client_version": "ios/1.6.7",
"date_time": "2016-05-31T18:00:13Z",
"duration": 4.670,
"fastly_duration": 2.670,
"handler": "fronts#index"
"log_type": "http",
"method": "POST",
"params": {
"user":"jkelly",
"password":"[FILTERED]"
},
"path": "/",
"request_id": "d90jcl66vp09r8tke3utjsd1pjrg4ln8",
"status": "200"
}
To use it, just plug it into the desired module. plug Plug.LoggerJSON, log: :debug
Options
:log
- The log level at which this plug should log its request info. Default is:info
.
Summary
Functions
Specs
call(Plug.Conn.t, atom) :: Plug.Conn.t
Callback implementation for c:Plug.call/2
.