[−][src]Struct fxa_email_service::logging::MozlogLogger
Mozlog-compatible logger type.
Methods
impl MozlogLogger[src]
impl MozlogLoggerpub fn new(settings: &Settings) -> Self[src]
pub fn new(settings: &Settings) -> SelfConstruct a logger.
pub fn with_request(request: &Request) -> Result<MozlogLogger, Error>[src]
pub fn with_request(request: &Request) -> Result<MozlogLogger, Error>Log a rocket request.
pub fn with_app_error(
logger: &MozlogLogger,
error: &AppError
) -> Result<MozlogLogger, Error>[src]
pub fn with_app_error(
logger: &MozlogLogger,
error: &AppError
) -> Result<MozlogLogger, Error>Log an application error.
Methods from Deref<Target = Logger>
pub fn new<T>(&self, values: OwnedKV<T>) -> Logger<D> where
D: Clone,
T: SendSyncRefUnwindSafeKV + 'static,
pub fn new<T>(&self, values: OwnedKV<T>) -> Logger<D> where
D: Clone,
T: SendSyncRefUnwindSafeKV + 'static, Build a child logger
Child logger inherits all existing key-value pairs from its parent and supplements them with additional ones.
Use o! macro to build OwnedKV object.
Drain cloning (D : Clone requirement)
All children, their children and so on, form one tree sharing a
common drain. This drain, will be Cloned when this method is called.
That is why Clone must be implemented for D in Logger<D>::new.
For some Drain types Clone is cheap or even free (a no-op). This is
the case for any Logger returned by Logger::root and it's children.
When using Logger::root_typed, it's possible that cloning might be
expensive, or even impossible.
The reason why wrapping in an Arc is not done internally, and exposed
to the user is performance. Calling Drain::log through an Arc is
tiny bit slower than doing it directly.
#[macro_use] extern crate slog; fn main() { let root = slog::Logger::root(slog::Discard, o!("key1" => "value1", "key2" => "value2")); let _log = root.new(o!("key" => "value")); }
pub fn log(&self, record: &Record)
pub fn log(&self, record: &Record)Log one logging Record
Use specific logging functions instead. See log! macro
documentation.
pub fn list(&self) -> &OwnedKVList
pub fn list(&self) -> &OwnedKVListGet list of key-value pairs assigned to this Logger
pub fn to_erased(
&self
) -> Logger<Arc<dyn SendSyncRefUnwindSafeDrain<Ok = (), Err = NeverStruct> + 'static>> where
D: SendRefUnwindSafeDrain + 'static + Clone,
pub fn to_erased(
&self
) -> Logger<Arc<dyn SendSyncRefUnwindSafeDrain<Ok = (), Err = NeverStruct> + 'static>> where
D: SendRefUnwindSafeDrain + 'static + Clone, Create a copy with "erased" type
See into_erased
Trait Implementations
impl Deref for MozlogLogger[src]
impl Deref for MozlogLoggerAuto Trait Implementations
impl Send for MozlogLogger
impl Send for MozlogLoggerimpl Sync for MozlogLogger
impl Sync for MozlogLoggerBlanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut Timpl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T> Same for T
impl<T> Same for Ttype Output = T
Should always be Self
impl<T> Typeable for T where
T: Any,
impl<T> Typeable for T where
T: Any, impl<T> Configure for T where
T: ?Sized, [src]
impl<T> Configure for T where
T: ?Sized, fn readable(self) -> Readable<Self>[src]
fn readable(self) -> Readable<Self>Marks self as using is_human_readable == true
fn compact(self) -> Compact<Self>[src]
fn compact(self) -> Compact<Self>Marks self as using is_human_readable == false
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,