cat_loggr/
loggr_config.rs

1use crate::log_level::LogLevel;
2
3pub struct LoggrConfig {
4	/// How to format the log timestamp with [`chrono::prelude::DateTime::format`]
5	pub timestamp_format: Option<String>,
6	/// The shard ID that the logger is on
7	pub shard: Option<String>,
8	/// The maximum number of characters that a shard can be
9	pub shard_length: Option<usize>,
10
11	/// The default log threshold
12	pub level: Option<String>,
13
14	/// Custom level definitions
15	pub levels: Option<Vec<LogLevel>>,
16
17	/// Use colors when outputting
18	pub color_enabled: bool,
19}
20
21impl Default for LoggrConfig {
22	fn default() -> Self {
23		Self {
24			timestamp_format: None,
25			shard: None,
26			shard_length: None,
27			level: None,
28			levels: None,
29			color_enabled: true,
30		}
31	}
32}