use candid::CandidType;
use serde::Deserialize;
const DEFAULT_IN_MEMORY_RECORDS: usize = 1024;
const DEFAULT_MAX_RECORD_LENGTH: usize = 1024;
#[derive(Debug, Clone, PartialEq, Eq, CandidType, Deserialize)]
pub struct LogSettings {
pub enable_console: bool,
pub in_memory_records: usize,
pub max_record_length: usize,
pub log_filter: String,
}
impl Default for LogSettings {
fn default() -> Self {
Self {
enable_console: false,
in_memory_records: DEFAULT_IN_MEMORY_RECORDS,
max_record_length: DEFAULT_MAX_RECORD_LENGTH,
log_filter: "warn".to_string(),
}
}
}