wasmcloud_core/
logging.rs1use serde::{Deserialize, Serialize};
8
9#[derive(Clone, Debug, Deserialize, Serialize)]
10#[serde(rename_all = "lowercase")]
11#[derive(Default)]
12pub enum Level {
13 Error,
14 Warn,
15 #[default]
16 Info,
17 Debug,
18 Trace,
19 Critical,
20}
21
22impl From<tracing::Level> for Level {
23 fn from(level: tracing::Level) -> Self {
24 match level {
25 tracing::Level::ERROR => Self::Error,
26 tracing::Level::WARN => Self::Warn,
27 tracing::Level::INFO => Self::Info,
28 tracing::Level::DEBUG => Self::Debug,
29 tracing::Level::TRACE => Self::Trace,
30 }
31 }
32}