Struct actix_web::Logger
[−]
[src]
pub struct Logger { /* fields omitted */ }
Middleware
for logging request and response info to the terminal.
Methods
impl Logger
[src]
fn new(format: Option<Format>) -> Logger
[src]
Create Logger
middlewares with the specified format
.
If a None
is passed in, uses the default format:
⚠Be careful when using this code, it's not being tested!
{method} {uri} -> {status} ({response-time} ms)
⚠Be careful when using this code, it's not being tested!
let app = Application::default("/") .middleware(Logger::new(None)) .finish()
Trait Implementations
impl Middleware for Logger
[src]
fn start(&self, req: &mut HttpRequest) -> Result<(), HttpResponse>
[src]
Method is called when request is ready.
fn finish(&self, req: &mut HttpRequest, resp: &HttpResponse)
[src]
Http interation is finished
fn response(&self, req: &mut HttpRequest, resp: HttpResponse) -> HttpResponse
[src]
Method is called when handler returns response, but before sending body streams to peer. Read more