feat: much better JSON logging, project-wide logging improvements, better use of debug/trace levels, field attributes

This commit is contained in:
2025-09-12 22:01:14 -05:00
parent 00cb209052
commit 14b02df8f4
19 changed files with 348 additions and 78 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ pub async fn gcal(
)
.await?;
info!("gcal command completed for CRN: {}", crn);
info!(crn = %crn, "gcal command completed");
Ok(())
}
+1 -1
View File
@@ -20,6 +20,6 @@ pub async fn ics(
))
.await?;
info!("ics command completed for CRN: {}", crn);
info!(crn = %crn, "ics command completed");
Ok(())
}
+1 -1
View File
@@ -20,6 +20,6 @@ pub async fn time(
))
.await?;
info!("time command completed for CRN: {}", crn);
info!(crn = %crn, "time command completed");
Ok(())
}
+1 -1
View File
@@ -18,7 +18,7 @@ pub async fn get_course_by_crn(ctx: &Context<'_>, crn: i32) -> Result<Course> {
.get_course_or_fetch(&term.to_string(), &crn.to_string())
.await
.map_err(|e| {
error!(%e, crn, "failed to fetch course data");
error!(error = %e, crn = %crn, "failed to fetch course data");
e
})
}