pub fn record_log(&self, msg: &Message, source: LogSource) {
        self.total_logs.add(1);
        match source {
            LogSource::Kernel => {
                self.kernel_logs.add(1);
            }
            LogSource::LogSink => {
                self.logsink_logs.add(1);
            }
        }
        match LogLevelFilter::from_primitive(msg.severity as i8) {
            Some(LogLevelFilter::Info) => {
                self.info_logs.add(1);
            }
            Some(LogLevelFilter::Warn) => {
                self.warning_logs.add(1);
            }
            Some(LogLevelFilter::Error) => {
                self.error_logs.add(1);
            }
            Some(LogLevelFilter::Fatal) => {
                self.fatal_logs.add(1);
            }
            _ => {
                self.verbose_logs.add(1);
            }
        }
    }
/// Record an incoming log from a given source.
///
/// This method updates the counters based on the contents of the log message.
Record an incoming log from a given source.
This method updates the counters based on the contents of the log message.
Record an incoming log from a given source . This method updates the counters based on the contents of the log message .
pub fn record_log(&self, msg: &Message, source: LogSource) {
        self.total_logs.add(1);
        match source {
            LogSource::Kernel => {
                self.kernel_logs.add(1);
            }
            LogSource::LogSink => {
                self.logsink_logs.add(1);
            }
        }
        match LogLevelFilter::from_primitive(msg.severity as i8) {
            Some(LogLevelFilter::Info) => {
                self.info_logs.add(1);
            }
            Some(LogLevelFilter::Warn) => {
                self.warning_logs.add(1);
            }
            Some(LogLevelFilter::Error) => {
                self.error_logs.add(1);
            }
            Some(LogLevelFilter::Fatal) => {
                self.fatal_logs.add(1);
            }
            _ => {
                self.verbose_logs.add(1);
            }
        }
    }
pub fn record_log ( & self , msg : & Message , source : LogSource ) { self . total_logs . add ( 1 ) ; match source { LogSource :: Kernel => { self . kernel_logs . add ( 1 ) ; } LogSource :: LogSink => { self . logsink_logs . add ( 1 ) ; } } match LogLevelFilter :: from_primitive ( msg . severity as i8 ) { Some ( LogLevelFilter :: Info ) => { self . info_logs . add ( 1 ) ; } Some ( LogLevelFilter :: Warn ) => { self . warning_logs . add ( 1 ) ; } Some ( LogLevelFilter :: Error ) => { self . error_logs . add ( 1 ) ; } Some ( LogLevelFilter :: Fatal ) => { self . fatal_logs . add ( 1 ) ; } _ => { self . verbose_logs . add ( 1 ) ; } } }
Record an incoming log from a given source.
Record an incoming log from a given source .
&self
msg
&Message
source
LogSource
&self
msg
&Message
source
LogSource