Add save timestamp support and log interceptor for enhanced debugging
- Introduced `created_at` metadata for saves, enabling timestamp tracking. - Added `InterceptorLogger` to capture logs, aiding in error diagnostics. - Updated web UI to display save creation timestamps. - Improved save/load functionality to maintain compatibility with older formats.
This commit is contained in:
@@ -570,7 +570,8 @@ impl Esp<'_> {
|
||||
|
||||
/// Persist a JSON config blob to the next wear-leveling slot.
|
||||
pub(crate) async fn save_config(&mut self, mut config: Vec<u8>) -> FatResult<()> {
|
||||
self.savegame.save(config.as_mut_slice())?;
|
||||
let timestamp = self.get_time().to_rfc3339();
|
||||
self.savegame.save(config.as_mut_slice(), ×tamp)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user