Tiny Clean up
diff --git a/packages/devtools_app/lib/main.dart b/packages/devtools_app/lib/main.dart index b2d65be..b0e2e61 100644 --- a/packages/devtools_app/lib/main.dart +++ b/packages/devtools_app/lib/main.dart
@@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:logging/logging.dart'; import 'src/app.dart'; import 'src/extension_points/extensions_base.dart'; @@ -15,12 +14,10 @@ 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'; import 'src/shared/globals.dart'; -import 'src/shared/log_storage.dart'; import 'src/shared/preferences.dart'; import 'src/shared/primitives/url_utils.dart'; import 'src/shared/primitives/utils.dart'; @@ -33,15 +30,6 @@ 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; @@ -54,7 +42,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();
diff --git a/packages/devtools_app/lib/src/shared/log_storage.dart b/packages/devtools_app/lib/src/shared/log_storage.dart index d388eb6..ad7f6ec 100644 --- a/packages/devtools_app/lib/src/shared/log_storage.dart +++ b/packages/devtools_app/lib/src/shared/log_storage.dart
@@ -7,7 +7,6 @@ final Queue<String> _logs = Queue<String>(); void addLog(String message) { - print('Adding Log: $message'); _logs.add(message); if (_logs.length > maxLogEntries) { _logs.removeFirst(); @@ -15,13 +14,11 @@ } 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 0fae572..7ef3efc 100644 --- a/packages/devtools_app/lib/src/shared/preferences.dart +++ b/packages/devtools_app/lib/src/shared/preferences.dart
@@ -13,6 +13,7 @@ import 'analytics/constants.dart' as gac; import 'diagnostics/inspector_service.dart'; import 'globals.dart'; +import 'log_storage.dart'; import 'primitives/auto_dispose.dart'; import 'primitives/utils.dart'; @@ -81,7 +82,12 @@ Logger.root.level = Level.WARNING; _log.warning('verboseLogging disabled'); } - print('Logger Level Changed: ${Logger.root.level}'); + }); + + Logger.root.onRecord.listen((record) { + LogStorage.root.addLog( + '[${record.loggerName}-${record.level.name}]: ${record.time.toUtc()}: ${record.message}', + ); }); await inspector.init();