[][src]Enum dqcsim::common::log::Loglevel

pub enum Loglevel {
    Fatal,
    Error,
    Warn,
    Note,
    Info,
    Debug,
    Trace,
}

Loglevel for log records.

Variants

Fatal

This loglevel is to be used for reporting a fatal error, resulting from the owner of the logger getting into an illegal state from which it cannot recover. Such problems are also reported to the API caller via Result::Err if applicable.

Error

This loglevel is to be used for reporting or propagating a non-fatal error caused by the API caller doing something wrong. Such problems are also reported to the API caller via Result::Err if applicable.

Warn

This loglevel is to be used for reporting that a called API/function is telling us we did something wrong (that we weren't expecting), but we can recover. For instance, for a failed connection attempt to something that really should not be failing, we can still retry (and eventually report critical or error if a retry counter overflows). Since we're still trying to rectify things at this point, such problems are NOT reported to the API/function caller via Result::Err.

Note

This loglevel is to be used for reporting information specifically requested by the user/API caller, such as the result of an API function requested through the command line, or an explicitly captured stdout/stderr stream.

Info

This loglevel is to be used for reporting information NOT specifically requested by the user/API caller, such as a plugin starting up or shutting down.

Debug

This loglevel is to be used for reporting debugging information useful for debugging the user of the API provided by the logged instance.

Trace

This loglevel is to be used for reporting debugging information useful for debugging the internals of the logged instance. Such messages would normally only be generated by debug builds, to prevent them from impacting performance under normal circumstances.

Methods

impl Loglevel[src]

pub fn try_from(levelfilter: LoglevelFilter) -> Result<Loglevel, ()>[src]

Attempt to convert a LoglevelFilter to a Loglevel.

Until std::convert::TryFrom is stable. (rust-lang/rust #33417)

Trait Implementations

impl PartialOrd<Loglevel> for Loglevel[src]

#[must_use] fn lt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use] fn le(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use] fn gt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use] fn ge(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq<Loglevel> for Loglevel[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Copy for Loglevel[src]

impl Eq for Loglevel[src]

impl From<Loglevel> for LoglevelFilter[src]

impl Into<u32> for Loglevel[src]

impl Clone for Loglevel[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Loglevel[src]

impl Display for Loglevel[src]

impl FromStr for Loglevel[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl Serialize for Loglevel[src]

impl<'de> Deserialize<'de> for Loglevel[src]

impl NamedType for Loglevel[src]

impl IntoEnumIterator for Loglevel[src]

type Iterator = LoglevelIter

Auto Trait Implementations

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,