-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#4875Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.14Found to occur in 3.14Found to occur in 3.14has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: go_routerThe go_router packageThe go_router packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
1 - Create a project with some routes using go_router.
2 - Add the logging package.
3 - Call this code to output all logs:
void setupLogging() {
Logger.root.onRecord.listen((record) {
final String message;
final messageHeader = '${record.level.name}: ${record.time}: ${record.message}';
if (record.level < Level.SEVERE) {
message = messageHeader;
} else {
message = '$messageHeader : ${record.error} : ${record.stackTrace}';
}
if (kDebugMode) {
print(message);
}
});
}4 - You will see GoRouter prints all the known routes when the app starts up.
This is happening because RouteConfiguration calls log.info(debugKnownRoutes()) on it's constructor
Expected results
No logs should be created if debugLogDiagnostics is false. This excessive logs will add irrelevant information to monitoring tools.
Actual results
Logs are being printed when debugLogDiagnostics is false.
Code sample
Code sample
[Paste your code here]Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[Paste your output here]Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.14Found to occur in 3.14Found to occur in 3.14has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: go_routerThe go_router packageThe go_router packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version