@@ -134,10 +134,10 @@ extension NavigationState {
134134
135135 internal func returnToCheckpoint< T> ( _ checkpoint: NavigationCheckpoint < T > ) {
136136 guard let ( navigator, found) = find ( checkpoint) else {
137- log ( type : . warning, " Navigator checkpoint not found in current navigation tree: \( checkpoint. name) " )
137+ log ( . warning( " checkpoint not found in current navigation tree: \( checkpoint. name) " ) )
138138 return
139139 }
140- log ( " Navigator returning to checkpoint: \( checkpoint. name) " )
140+ log ( . checkpoint( . returning ( checkpoint. name) ) )
141141 _ = navigator. dismissAnyChildren ( )
142142 _ = navigator. pop ( to: found. index)
143143 // send trigger to specific action handler
@@ -149,10 +149,10 @@ extension NavigationState {
149149
150150 internal func returnToCheckpoint< T: Hashable > ( _ checkpoint: NavigationCheckpoint < T > , value: T ) {
151151 guard let ( navigator, found) = find ( checkpoint) else {
152- log ( type : . warning, " Navigator checkpoint value handler not found: \( checkpoint. name) " )
152+ log ( . warning( " checkpoint value handler not found: \( checkpoint. name) " ) )
153153 return
154154 }
155- log ( " Navigator returning to checkpoint: \( checkpoint. name) value: \( value ) " )
155+ log ( . checkpoint( . returningWithValue ( checkpoint. name, value) ) )
156156 // return to sender
157157 _ = navigator. dismissAnyChildren ( )
158158 _ = navigator. pop ( to: found. index)
@@ -176,13 +176,15 @@ extension NavigationState {
176176 return
177177 }
178178 checkpoints [ entry. key] = entry
179- log ( " Navigator \( id) adding checkpoint: \( entry. key) " )
179+ log ( . checkpoint( . adding( checkpoint. name) ) )
180+ // log("Navigator \(id) adding checkpoint: \(entry.key)")
180181 }
181182
182183 internal func cleanCheckpoints( ) {
183184 checkpoints = checkpoints. filter {
184185 guard $1. index <= path. count else {
185- log ( " Navigator \( id) removing checkpoint: \( $1. key) " )
186+ log ( . checkpoint( . removing( $1. key) ) )
187+ // log("Navigator \(id) removing checkpoint: \($1.key)")
186188 return false
187189 }
188190 return true
@@ -279,7 +281,7 @@ private struct NavigationCheckpointActionModifier<T>: ViewModifier {
279281 content
280282 . onReceive ( navigator. state. publisher) { values in
281283 if let _: CheckpointAction = values. consume ( checkpoint. identifier) {
282- navigator. log ( " Navigator processing checkpoint action: \( checkpoint. name) " )
284+ navigator. log ( . checkpoint( . returning ( checkpoint. name) ) )
283285 action ( )
284286 values. resume ( . auto)
285287 }
@@ -303,7 +305,7 @@ private struct NavigationCheckpointValueModifier<T: Hashable>: ViewModifier {
303305 content
304306 . onReceive ( navigator. state. publisher) { values in
305307 if let value: T = values. consume ( checkpoint. identifier) {
306- navigator. log ( " Navigator processing checkpoint: \( checkpoint. name) value: \( value ) " )
308+ navigator. log ( . checkpoint( . returningWithValue ( checkpoint. name, value) ) )
307309 completion ( value)
308310 values. resume ( . auto)
309311 }
0 commit comments