GoRouter has a debugLogDiagnostics property which can be set at the router level to show logs during navigation.
Adding this to jaspr_router would help developers debug issues during routing.
The output would be identical to GoRouter's:
Output on startup:
Router: known full paths for routes:
Router: => /
Router: => /family/:fid
Router: => /family/:fid/person/:pid
Router: known full paths for route names:
Router: home => /
Router: family => /family/:fid
Router: person => /family/:fid/person/:pid
Output on route change:
Router: location changed to /
Router: getting location for name: "person", params: {fid: f2, pid: p1}
Router: going to /family/f2/person/p1
Router: location changed to /family/f2/person/p1
Output on error:
Router: Exception: no routes for location: /foobarquux
Contribution
I would be open to implement this. Haven't really taken a deeper look at the code, but this is what I have so far:
Description
GoRouter has a
debugLogDiagnostics
property which can be set at the router level to show logs during navigation.Adding this to jaspr_router would help developers debug issues during routing.
The output would be identical to GoRouter's:
Output on startup:
Output on route change:
Output on error:
Contribution
I would be open to implement this. Haven't really taken a deeper look at the code, but this is what I have so far:
Add
debugLogDiagnostics
property to the Router:Output on startup would be added in the following method:
Output on route change would be added in the following method:
Correct me if something is wrong.