fn log()

in logger/src/sampling.rs [26:40]


    fn log(&self, record: &log::Record<'_>) {
        // If the log message is filtered by the log level, return early.
        if !self.enabled(record.metadata()) {
            return;
        }

        let count = self.counter.fetch_add(1, Ordering::Relaxed);

        // if this is the Nth message, we should log it
        if (count % self.sample) == 0 {
            self.logger.log(record)
        } else {
            LOG_SKIP.increment();
        }
    }