Lots of logging and cache obliteration
diff --git a/packages/devtools_app/lib/main.dart b/packages/devtools_app/lib/main.dart index 8ab83fe..b2d65be 100644 --- a/packages/devtools_app/lib/main.dart +++ b/packages/devtools_app/lib/main.dart
@@ -15,6 +15,7 @@ import 'src/shared/analytics/analytics_controller.dart'; import 'src/shared/config_specific/framework_initialize/framework_initialize.dart'; import 'src/shared/config_specific/ide_theme/ide_theme.dart'; +import 'src/shared/config_specific/logger/logger.dart'; import 'src/shared/config_specific/url/url.dart'; import 'src/shared/config_specific/url_strategy/url_strategy.dart'; import 'src/shared/feature_flags.dart'; @@ -32,6 +33,15 @@ bool shouldEnableExperiments = false, List<DevToolsJsonFile> sampleData = const [], }) async { + print('DAKE: This is a runDevTools print'); + log('DAKE: Running Devtools'); + log('DAKE: Setting Up ONLISTEN'); + Logger.root.onRecord.listen((record) { + log('DAKE: LOGGER GOT MESSAGE'); + LogStorage.root.addLog( + '[${record.loggerName}-${record.level.name}]: ${record.time.toUtc()}: ${record.message}', + ); + }); // Before switching to URL path strategy, check if this URL is in the legacy // fragment format and redirect if necessary. if (_handleLegacyUrl()) return; @@ -44,7 +54,7 @@ if (shouldEnableExperiments) { setEnableExperiments(); } - + log('DAKE: before initializeFramework'); // Initialize the framework before we do anything else, otherwise the // StorageController won't be initialized and preferences won't be loaded. await initializeFramework(); @@ -62,12 +72,6 @@ // Load the Dart syntax highlighting grammar. await SyntaxHighlighter.initialize(); - Logger.root.onRecord.listen((record) { - LogStorage.root.addLog( - '[${record.loggerName}-${record.level.name}]: ${record.time.toUtc()}: ${record.message}', - ); - }); - setupErrorHandling(() async { // Run the app. runApp(
diff --git a/packages/devtools_app/lib/src/framework/framework_core.dart b/packages/devtools_app/lib/src/framework/framework_core.dart index 897235d..afd4501 100644 --- a/packages/devtools_app/lib/src/framework/framework_core.dart +++ b/packages/devtools_app/lib/src/framework/framework_core.dart
@@ -39,7 +39,7 @@ static void init() { // Print the version number at startup. - log('DevTools version ${devtools.version}.'); + log('zzzDevTools version ${devtools.version}.'); } /// Returns true if we're able to connect to a device and false otherwise.
diff --git a/packages/devtools_app/lib/src/shared/log_storage.dart b/packages/devtools_app/lib/src/shared/log_storage.dart index ad7f6ec..d388eb6 100644 --- a/packages/devtools_app/lib/src/shared/log_storage.dart +++ b/packages/devtools_app/lib/src/shared/log_storage.dart
@@ -7,6 +7,7 @@ final Queue<String> _logs = Queue<String>(); void addLog(String message) { + print('Adding Log: $message'); _logs.add(message); if (_logs.length > maxLogEntries) { _logs.removeFirst(); @@ -14,11 +15,13 @@ } void clear() { + print('Clearing Logs'); _logs.clear(); } @override String toString() { + print('Logs toString ${_logs.join('\n')}'); return _logs.join('\n'); }
diff --git a/packages/devtools_app/lib/src/shared/preferences.dart b/packages/devtools_app/lib/src/shared/preferences.dart index f6b19d8..0fae572 100644 --- a/packages/devtools_app/lib/src/shared/preferences.dart +++ b/packages/devtools_app/lib/src/shared/preferences.dart
@@ -81,6 +81,7 @@ Logger.root.level = Level.WARNING; _log.warning('verboseLogging disabled'); } + print('Logger Level Changed: ${Logger.root.level}'); }); await inspector.init();
diff --git a/packages/devtools_app/web/index.html b/packages/devtools_app/web/index.html index 249b0dd..b4bc0a6 100644 --- a/packages/devtools_app/web/index.html +++ b/packages/devtools_app/web/index.html
@@ -52,7 +52,7 @@ application. For more information, see: https://developers.google.com/web/fundamentals/primers/service-workers --> <script> - var version = '2.22.2'; + var version = `2.22.2-${Math.random()}`; var scriptLoaded = false; function loadMainDartJs() { if (scriptLoaded) {