From 01adbbd31fe97922c50c2b15414bc7cc181467f2 Mon Sep 17 00:00:00 2001 From: Sean Madden Date: Sun, 17 Sep 2023 23:39:48 -0400 Subject: [PATCH] fix(winloc): add additional trace logging to the location handler --- interfaces/win-location-api/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/interfaces/win-location-api/src/lib.rs b/interfaces/win-location-api/src/lib.rs index 806bdfb0..938859d1 100644 --- a/interfaces/win-location-api/src/lib.rs +++ b/interfaces/win-location-api/src/lib.rs @@ -6,7 +6,7 @@ pub use crate::windows::*; #[cfg(target_os = "windows")] mod windows { - use log::{error, trace, warn}; + use log::{error, info, trace, warn}; use windows::Devices::Geolocation::{Geolocator, PositionChangedEventArgs}; use windows::Foundation::{EventRegistrationToken, TypedEventHandler}; @@ -59,6 +59,7 @@ mod windows { }, ); let res = self.locator.PositionChanged(&handler)?; + trace!("Location handler registered."); Ok(LocationHandler { locator: &self.locator, token: res, @@ -74,6 +75,7 @@ mod windows { impl<'a> Drop for LocationHandler<'a> { fn drop(&mut self) { let _res = self.locator.RemovePositionChanged(self.token); + trace!("Dropped location handler."); } } }