Make debug logging into an optional feature

This commit is contained in:
Michael Mikovsky
2025-11-11 11:00:28 -07:00
parent 379b6a7e25
commit 258599c9c7
12 changed files with 151 additions and 38 deletions
+7 -2
View File
@@ -18,7 +18,7 @@ pub enum LogLevel {
#[derive(Debug)]
pub struct Record {
log_level: LogLevel,
location: String,
location: Option<String>,
// line: u32,
time: SystemTime,
message: String,
@@ -46,7 +46,12 @@ pub fn set_logger(logger: &'static dyn Logger) {
}
}
pub fn add_record(log_level: LogLevel, location: String, time: SystemTime, message: String) {
pub fn add_record(
log_level: LogLevel,
location: Option<String>,
time: SystemTime,
message: String,
) {
logger().log(Record {
log_level,
location,