diff --git a/Aware/macOS/ActivityMonitor.swift b/Aware/macOS/ActivityMonitor.swift index 2797239..96b562b 100644 --- a/Aware/macOS/ActivityMonitor.swift +++ b/Aware/macOS/ActivityMonitor.swift @@ -33,7 +33,7 @@ struct ActivityMonitor { func updates() -> AsyncStream> { AsyncStream(bufferingPolicy: .bufferingNewest(1)) { @MainActor yield in do { - logger.info("Starting ActivityMonitor update task: \(initialState, privacy: .public)") + logger.log("Starting ActivityMonitor update task: \(initialState, privacy: .public)") var state = initialState { didSet { @@ -108,9 +108,9 @@ struct ActivityMonitor { assert(Task.isCancelled) try Task.checkCancellation() - logger.info("Finished ActivityMonitor update task") + logger.log("Finished ActivityMonitor update task") } catch is CancellationError { - logger.info("ActivityMonitor update task canceled") + logger.log("ActivityMonitor update task canceled") } catch { logger.error("ActivityMonitor update task canceled unexpectedly: \(error, privacy: .public)") } diff --git a/Aware/macOS/MenuBar.swift b/Aware/macOS/MenuBar.swift index 31c1b54..c8cf40f 100644 --- a/Aware/macOS/MenuBar.swift +++ b/Aware/macOS/MenuBar.swift @@ -58,12 +58,12 @@ struct TimerMenuBarLabel: View { } .task(id: activityMonitorConfiguration) { let activityMonitor = ActivityMonitor(initialState: timerState, configuration: activityMonitorConfiguration) - logger.info("Starting ActivityMonitor updates task: \(timerState, privacy: .public)") + logger.log("Starting ActivityMonitor updates task: \(timerState, privacy: .public)") for await state in activityMonitor.updates() { - logger.info("Received ActivityMonitor state: \(state, privacy: .public)") + logger.log("Received ActivityMonitor state: \(state, privacy: .public)") timerState = state } - logger.info("Finished ActivityMonitor updates task: \(timerState, privacy: .public)") + logger.log("Finished ActivityMonitor updates task: \(timerState, privacy: .public)") } .onAppear { statusBarButton = findStatusBarItem()?.button diff --git a/Aware/visionOS/ActivityMonitor.swift b/Aware/visionOS/ActivityMonitor.swift index 5e8264e..0453d9d 100644 --- a/Aware/visionOS/ActivityMonitor.swift +++ b/Aware/visionOS/ActivityMonitor.swift @@ -42,7 +42,7 @@ struct ActivityMonitor { func updates() -> AsyncStream> { AsyncStream(bufferingPolicy: .bufferingNewest(1)) { @MainActor yield in do { - logger.info("Starting ActivityMonitor update task: \(initialState)") + logger.log("Starting ActivityMonitor update task: \(initialState)") var state = initialState { didSet { @@ -162,9 +162,9 @@ struct ActivityMonitor { assert(Task.isCancelled) try Task.checkCancellation() - logger.info("Finished ActivityMonitor update task") + logger.log("Finished ActivityMonitor update task") } catch is CancellationError { - logger.info("ActivityMonitor update task canceled") + logger.log("ActivityMonitor update task canceled") } catch { logger.error("ActivityMonitor update task canceled unexpectedly: \(error, privacy: .public)") } diff --git a/Aware/visionOS/TimerView.swift b/Aware/visionOS/TimerView.swift index 8b1b148..a3d418f 100644 --- a/Aware/visionOS/TimerView.swift +++ b/Aware/visionOS/TimerView.swift @@ -47,9 +47,12 @@ struct TimerView: View { } .task(id: activityMonitorConfiguration) { let activityMonitor = ActivityMonitor(initialState: timerState, configuration: activityMonitorConfiguration) + logger.log("Starting ActivityMonitor updates task: \(timerState, privacy: .public)") for await state in activityMonitor.updates() { + logger.log("Received ActivityMonitor state: \(state, privacy: .public)") timerState = state } + logger.log("Finished ActivityMonitor updates task: \(timerState, privacy: .public)") } } }