pub struct SLogger(/* private fields */);Expand description
Implementations§
Source§impl SLogger
 
impl SLogger
Sourcepub fn exclude<T: Into<String>>(self, path: T) -> Self
 
pub fn exclude<T: Into<String>>(self, path: T) -> Self
Ignore and do not log access info for specified path.
Sourcepub fn exclude_regex<T: Into<String>>(self, path: T) -> Self
 
pub fn exclude_regex<T: Into<String>>(self, path: T) -> Self
Ignore and do not log access info for paths that match regex.
Sourcepub fn log_target(self, target: impl Into<Cow<'static, str>>) -> Self
 
pub fn log_target(self, target: impl Into<Cow<'static, str>>) -> Self
Sets the logging target to target.
By default, the log target is module_path!() of the log call location. In our case, that
would be actix_web_middleware_slogger::logger.
§Examples
Using .log_target("http_slog") would have this effect on request logs:
- [2015-10-21T07:28:00Z INFO  actix_web_middleware_slogger::logger] 127.0.0.1 "GET / HTTP/1.1" 200 88 "-" "dmc/1.0" 0.001985
+ [2015-10-21T07:28:00Z INFO  http_slog] 127.0.0.1 "GET / HTTP/1.1" 200 88 "-" "dmc/1.0" 0.001985
                              ^^^^^^^^^Trait Implementations§
Source§impl<S, B> Transform<S, ServiceRequest> for SLogger
 
impl<S, B> Transform<S, ServiceRequest> for SLogger
Source§type Response = ServiceResponse<StreamLog<B>>
 
type Response = ServiceResponse<StreamLog<B>>
Responses produced by the service.
Source§type Transform = SLoggerMiddlewareService<S>
 
type Transform = SLoggerMiddlewareService<S>
The 
TransformService value created by this factorySource§type Future = Ready<Result<<SLogger as Transform<S, ServiceRequest>>::Transform, <SLogger as Transform<S, ServiceRequest>>::InitError>>
 
type Future = Ready<Result<<SLogger as Transform<S, ServiceRequest>>::Transform, <SLogger as Transform<S, ServiceRequest>>::InitError>>
The future response value.
Source§fn new_transform(&self, service: S) -> Self::Future
 
fn new_transform(&self, service: S) -> Self::Future
Creates and returns a new Transform component, asynchronously
Auto Trait Implementations§
impl Freeze for SLogger
impl RefUnwindSafe for SLogger
impl !Send for SLogger
impl !Sync for SLogger
impl Unpin for SLogger
impl UnwindSafe for SLogger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more