logscale_log/
options.rs

1use std::time::Duration;
2
3impl Default for LoggerOptions {
4    fn default() -> Self {
5        Self {
6            ingest_policy: LoggerIngestPolicy::Periodically(Duration::from_secs(5)),
7        }
8    }
9}
10
11#[derive(Clone, Copy)]
12pub enum LoggerIngestPolicy {
13    Immediately,
14    Periodically(Duration),
15}
16
17#[derive(Clone, Copy)]
18pub struct LoggerOptions {
19    pub ingest_policy: LoggerIngestPolicy,
20}
21
22impl LoggerOptions {
23    pub fn new(ingest_policy: LoggerIngestPolicy) -> Self {
24        Self { ingest_policy }
25    }
26}