Struct gotham::middleware::logger::SimpleLogger [−][src]
pub struct SimpleLogger { /* fields omitted */ }
Expand description
A struct that can act as a simple logging middleware for Gotham.
We implement NewMiddleware
here for Gotham to allow us to work with the request
lifecycle correctly. This trait requires Clone
, so that is also included.
Implementations
Trait Implementations
Implementing gotham::middleware::Middleware
allows us to hook into the request chain
in order to correctly log out after a request has executed.
Implementation of NewMiddleware
is required for Gotham middleware.
This will simply dereference the internal state, rather than deriving NewMiddleware
which will clone the structure - should be cheaper for repeated calls.
Returns a new middleware to be used to serve a request.
type Instance = Self
type Instance = Self
The type of Middleware
created by the NewMiddleware
.
Auto Trait Implementations
impl RefUnwindSafe for SimpleLogger
impl Send for SimpleLogger
impl Sync for SimpleLogger
impl Unpin for SimpleLogger
impl UnwindSafe for SimpleLogger
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more