Trait enso_logger::AnyLogger[][src]

pub trait AnyLogger {
    type Owned;
    fn new(path: impl Into<ImString>) -> Self::Owned;
fn path(&self) -> &str; fn sub<T>(&self, id: impl AsRef<str>) -> T
    where
        T: AnyLogger<Owned = T>,
        Self: Sized
, { ... }
fn new_sub(logger: impl AnyLogger, id: impl AsRef<str>) -> Self::Owned
    where
        Self::Owned: AnyLogger<Owned = Self::Owned>
, { ... } }
Expand description

A common interface for all loggers. Exposing all information needed to create a particular sub-logger from a given parent logger of any type.

Associated Types

The owned type of this logger. As this trait is implemented for logger references, this dependent type just removes the references in this case.

Required methods

Constructor.

Path that is used as an unique identifier of this logger.

Provided methods

Creates a new logger with this logger as a parent. It can be useful when we need to create a sub-logger for a generic type parameter.

Creates a new logger with this logger as a parent. It can be useful when we need to create a sub-logger for a generic type parameter.

Implementations on Foreign Types

Implementors