mirror of
https://github.com/Xevion/banner.git
synced 2026-01-31 08:23:35 -06:00
chore: reduce tracing verbosity and normalize log levels
This commit is contained in:
+2
-5
@@ -142,11 +142,8 @@ impl BannerApi {
|
||||
|
||||
/// Performs a course search and handles common response processing.
|
||||
#[tracing::instrument(
|
||||
skip(self, query),
|
||||
fields(
|
||||
term = %term,
|
||||
subject = %query.get_subject().unwrap_or(&"all".to_string())
|
||||
)
|
||||
skip(self, query, sort, sort_descending),
|
||||
fields(term = %term)
|
||||
)]
|
||||
async fn perform_search(
|
||||
&self,
|
||||
|
||||
@@ -48,11 +48,9 @@ impl Middleware for TransparentMiddleware {
|
||||
}
|
||||
Ok(response)
|
||||
} else {
|
||||
let e = response.error_for_status_ref().unwrap_err();
|
||||
warn!(
|
||||
method = method,
|
||||
path = path,
|
||||
error = ?e,
|
||||
status = response.status().as_u16(),
|
||||
duration_ms = duration.as_millis(),
|
||||
"Request failed"
|
||||
@@ -64,7 +62,6 @@ impl Middleware for TransparentMiddleware {
|
||||
warn!(
|
||||
method = method,
|
||||
path = path,
|
||||
error = ?error,
|
||||
duration_ms = duration.as_millis(),
|
||||
"Request failed"
|
||||
);
|
||||
|
||||
@@ -39,14 +39,14 @@ impl Job for SubjectJob {
|
||||
|
||||
if let Some(courses_from_api) = search_result.data {
|
||||
info!(
|
||||
subject = subject_code,
|
||||
subject = %subject_code,
|
||||
count = courses_from_api.len(),
|
||||
"Found courses"
|
||||
);
|
||||
batch_upsert_courses(&courses_from_api, db_pool).await?;
|
||||
}
|
||||
|
||||
debug!(subject = subject_code, "Subject job completed");
|
||||
debug!(subject = %subject_code, "Subject job completed");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ impl Worker {
|
||||
let job_impl = job_type.boxed();
|
||||
|
||||
// Create span with job context
|
||||
let span = tracing::debug_span!(
|
||||
let span = tracing::info_span!(
|
||||
"process_job",
|
||||
job_id = job.id,
|
||||
job_type = job_impl.description()
|
||||
@@ -234,7 +234,7 @@ impl Worker {
|
||||
// Atomically unlock and increment retry count, checking if retry is allowed
|
||||
match self.unlock_and_increment_retry(job_id, max_retries).await {
|
||||
Ok(can_retry) if can_retry => {
|
||||
info!(
|
||||
debug!(
|
||||
worker_id = self.id,
|
||||
job_id,
|
||||
retry_attempt = next_attempt,
|
||||
|
||||
Reference in New Issue
Block a user