[][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.

Implementations

impl Loglevel[src]

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

Attempt to convert a LoglevelFilter to a Loglevel.

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

Trait Implementations

impl Clone for Loglevel[src]

impl Copy for Loglevel[src]

impl Debug for Loglevel[src]

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

impl Display for Loglevel[src]

impl Eq for Loglevel[src]

impl From<Loglevel> for LoglevelFilter[src]

impl From<Loglevel> for dqcs_loglevel_t[src]

impl FromStr for Loglevel[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl Into<u32> for Loglevel[src]

impl IntoEnumIterator for Loglevel[src]

type Iterator = LoglevelIter

impl PartialEq<Loglevel> for Loglevel[src]

impl PartialOrd<Loglevel> for Loglevel[src]

impl Serialize for Loglevel[src]

impl StructuralEq for Loglevel[src]

impl StructuralPartialEq for Loglevel[src]

Auto Trait Implementations

impl RefUnwindSafe for Loglevel

impl Send for Loglevel

impl Sync for Loglevel

impl Unpin for Loglevel

impl UnwindSafe for Loglevel

Blanket Implementations

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

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,