pub enum LogLevel {
Off,
Error,
Warn,
Info,
Debug,
Trace,
}Expand description
How much of the daemon’s own diagnostics reaches its log.
Written as one of the names below in [daemon] log_level or in
SHEP_LOG_LEVEL, lowercase and nothing else, the same closed grammar
log_json accepts, so a typo is a startup error naming the value
rather than a level silently reverting to the default.
The default is LogLevel::Warn. The daemon’s records are dominated
by warn-and-continue arms, each the only account of a decision the
operator cannot otherwise see. LogLevel::Debug adds per-decision
detail firing per dropped restart and per child metric sample, a
firehose on a busy flock.
Variants§
Off
Nothing at all: the daemon writes no records of its own.
Error
Only faults the daemon could not work around.
Warn
Faults the daemon worked around, and what working around them cost.
Info
Lifecycle milestones: the daemon came up, the daemon is going down.
Debug
Per-decision detail: every restart weighed, every metric sampled.
Trace
Everything the daemon can say about itself.
Implementations§
Source§impl LogLevel
impl LogLevel
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The one spelling this level is written as, in the file and in the environment alike
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
The level name spells, or None when it spells no level.
The inverse of LogLevel::as_str, and exact: an uppercase or
mixed-case name is not a level here, because SHEP_LOG_JSON accepts
no TRUE either.
Trait Implementations§
impl Copy for LogLevel
Source§impl<'de> Deserialize<'de> for LogLevel
impl<'de> Deserialize<'de> for LogLevel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for LogLevel
impl StructuralPartialEq for LogLevel
Auto Trait Implementations§
impl Freeze for LogLevel
impl RefUnwindSafe for LogLevel
impl Send for LogLevel
impl Sync for LogLevel
impl Unpin for LogLevel
impl UnsafeUnpin for LogLevel
impl UnwindSafe for LogLevel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.