[flutter_tools] Add test that "Unresolve URI" warnings from DWDS are filtered from logs (#102399)
This commit is contained in:
committed by
GitHub
parent
a3a9a23e46
commit
5a3e10047f
@@ -275,7 +275,7 @@ class WebAssetServer implements AssetReader {
|
||||
}
|
||||
|
||||
logging.Logger.root.level = logging.Level.ALL;
|
||||
logging.Logger.root.onRecord.listen(_log);
|
||||
logging.Logger.root.onRecord.listen(log);
|
||||
|
||||
// In debug builds, spin up DWDS and the full asset server.
|
||||
final Dwds dwds = await dwdsLauncher(
|
||||
@@ -1004,7 +1004,8 @@ class ReleaseAssetServer {
|
||||
}
|
||||
}
|
||||
|
||||
void _log(logging.LogRecord event) {
|
||||
@visibleForTesting
|
||||
void log(logging.LogRecord event) {
|
||||
final String error = event.error == null? '': 'Error: ${event.error}';
|
||||
if (event.level >= logging.Level.SEVERE) {
|
||||
globals.printError('${event.loggerName}: ${event.message}$error', stackTrace: event.stackTrace);
|
||||
|
||||
Reference in New Issue
Block a user