huskies: merge 858
This commit is contained in:
@@ -24,6 +24,7 @@ pub enum LogLevel {
|
||||
}
|
||||
|
||||
impl LogLevel {
|
||||
/// Return the uppercase string label for this level (`"ERROR"`, `"WARN"`, or `"INFO"`).
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
LogLevel::Error => "ERROR",
|
||||
@@ -75,6 +76,7 @@ impl LogEntry {
|
||||
}
|
||||
}
|
||||
|
||||
/// Bounded in-memory ring buffer holding recent log entries and a broadcast channel for live streaming.
|
||||
pub struct LogBuffer {
|
||||
entries: Mutex<VecDeque<LogEntry>>,
|
||||
log_file: Mutex<Option<PathBuf>>,
|
||||
|
||||
Reference in New Issue
Block a user