File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
packages/powersync/lib/src Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 11import 'package:logging/logging.dart' ;
22
3+ // Duplicate from package:flutter/foundation.dart, so we don't need to depend on Flutter
4+ const bool kReleaseMode = bool .fromEnvironment ('dart.vm.product' );
5+ const bool kProfileMode = bool .fromEnvironment ('dart.vm.profile' );
6+ const bool kDebugMode = ! kReleaseMode && ! kProfileMode;
7+
38final isolateLogger = Logger .detached ('PowerSync' );
Original file line number Diff line number Diff line change 11import 'dart:async' ;
22import 'dart:isolate' ;
33
4- import 'package:flutter/foundation.dart' ;
54import 'package:logging/logging.dart' ;
65import 'package:sqlite_async/sqlite3.dart' as sqlite;
76import 'package:sqlite_async/sqlite_async.dart' ;
@@ -125,6 +124,7 @@ class PowerSyncDatabase with SqliteQueries implements SqliteConnection {
125124 if (log == LogType .debug || log == LogType .auto) {
126125 // Use a detached logger to log directly to the console
127126 logger = Logger .detached ('PowerSync' );
127+
128128 final debug = log == LogType .debug || kDebugMode;
129129 if (debug) {
130130 logger.level = Level .FINE ;
You can’t perform that action at this time.
0 commit comments