raxx_logger v0.2.2 Raxx.Logger
Middleware for basic logging in the format:
GET /index.html Sent 200 in 572ms
Options
:level
- The log level this middleware will use for request and response information. Default is:info
.
Link to this section Summary
Functions
Called every time data from the request body is received.
Called once when a client starts a stream,
Called for all other messages the middleware may recieve.
Called once when a request finishes.
Link to this section Functions
process_data(data, state, next)
Called every time data from the request body is received.
Callback implementation for Raxx.Middleware.process_data/3
.
process_head(request, options, next)
Called once when a client starts a stream,
The arguments a Raxx.Request
, the middleware configuration and
the "inner" server for the middleware to call through to.
This callback can be relied upon to execute before any other callbacks
Callback implementation for Raxx.Middleware.process_head/3
.
process_info(info, state, next)
Called for all other messages the middleware may recieve.
The middleware is responsible for forwarding them to the inner server.
Callback implementation for Raxx.Middleware.process_info/3
.
process_tail(tail, state, next)
Called once when a request finishes.
This will be called with an empty list of headers is request is completed without trailers.
Will not be called at all if the Raxx.Request.t/0
passed to c:process_head/3
had body: false
.
Callback implementation for Raxx.Middleware.process_tail/3
.