Add debug logging to trace switcher storage/retrieval
Added info! logs to add_switcher() and get_switchers() to debug why switchers are not rendering on stage.
This commit is contained in:
parent
2cc4fa65df
commit
47988eff92
1 changed files with 11 additions and 7 deletions
|
|
@ -156,12 +156,11 @@ fn add_switcher(
|
||||||
.arg(switcher_data.to_string())
|
.arg(switcher_data.to_string())
|
||||||
.query(&mut conn);
|
.query(&mut conn);
|
||||||
|
|
||||||
trace!(
|
info!("ADD_SWITCHER: Stored switcher '{}' ({}) to Redis key '{}' for session {}",
|
||||||
"Added switcher '{}' ({}) to session {}",
|
switcher_id,
|
||||||
switcher_id,
|
if is_standard_switcher(first_param) { "standard" } else { "custom" },
|
||||||
if is_standard_switcher(first_param) { "standard" } else { "custom" },
|
redis_key,
|
||||||
user_session.id
|
user_session.id);
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
trace!("No cache configured, switcher not added");
|
trace!("No cache configured, switcher not added");
|
||||||
}
|
}
|
||||||
|
|
@ -211,10 +210,15 @@ pub fn get_switchers(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
info!(
|
info!(
|
||||||
"Retrieved {} switchers for session {}",
|
"Retrieved {} switchers from Redis key '{}' for session {}",
|
||||||
switchers.len(),
|
switchers.len(),
|
||||||
|
redis_key,
|
||||||
session_id
|
session_id
|
||||||
);
|
);
|
||||||
|
// Debug: log each switcher
|
||||||
|
for sw in &switchers {
|
||||||
|
info!(" - Switcher: id={}, label={}", sw.id, sw.label.as_deref().unwrap_or(""));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Err(e) => error!("Failed to get switchers from Redis: {}", e),
|
Err(e) => error!("Failed to get switchers from Redis: {}", e),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue