Trait enso_flexer::prelude::AnyLogger[][src]

pub trait AnyLogger {
    type Owned;
    fn new(path: impl Into<ImString>) -> Self::Owned;
fn path(&self) -> &str; fn sub(logger: impl AnyLogger, id: impl AsRef<str>) -> Self::Owned
    where
        Self::Owned: AnyLogger,
        <Self::Owned as 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

type Owned[src]

Expand description

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

Loading content...

Required methods

fn new(path: impl Into<ImString>) -> Self::Owned[src]

Expand description

Constructor.

fn path(&self) -> &str[src]

Expand description

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

Loading content...

Provided methods

fn sub(logger: impl AnyLogger, id: impl AsRef<str>) -> Self::Owned where
    Self::Owned: AnyLogger,
    <Self::Owned as AnyLogger>::Owned == Self::Owned
[src]

Expand description

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.

Loading content...

Implementations on Foreign Types

impl<'_, T> AnyLogger for &'_ T where
    T: AnyLogger
[src]

type Owned = <T as AnyLogger>::Owned

pub fn new(path: impl Into<ImString>) -> <&'_ T as AnyLogger>::Owned[src]

pub fn path(&self) -> &str[src]

Loading content...

Implementors

impl<Filter, Processor, Level> AnyLogger for Logger<Filter, Processor, Level> where
    Processor: Default
[src]

type Owned = Logger<Filter, Processor, Level>

pub fn new(path: impl Into<ImString>) -> Logger<Filter, Processor, Level>[src]

pub fn path(&self) -> &str[src]

Loading content...