XCoordinator icon indicating copy to clipboard operation
XCoordinator copied to clipboard

Logging of triggered Routes

Open cornr opened this issue 3 years ago • 1 comments

Hi and thanks for this awesome library.

We are using several Coordinators in our App. Now we would like to log which route has been triggered. We could implement this in each Coordinator implementation in prepareTransition(for route:). But this could easily be forgotten. Is there a way to hook into the Coordinator or some other place to generically print each triggered Route to the console?

Thanks for any help. Jonas

cornr avatar Aug 02 '22 12:08 cornr

Hey @cornr - thank you for your interest in this library.

Unfortunately, there is no such functionality at the moment. You might however be possible to create your own subclasses to NavigationCoordinator, TabBarCoordinator, etc with that logging functionality to at least reduce code duplication.

pauljohanneskraft avatar Aug 02 '22 13:08 pauljohanneskraft