mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-11 05:04:35 +00:00
quick fix for isar async write problem
This commit is contained in:
parent
fd9b09d37a
commit
3a2042eb92
1 changed files with 37 additions and 32 deletions
|
@ -12,8 +12,7 @@ import 'package:stackwallet/utilities/enums/log_level_enum.dart';
|
||||||
export 'enums/log_level_enum.dart';
|
export 'enums/log_level_enum.dart';
|
||||||
|
|
||||||
class Logging {
|
class Logging {
|
||||||
static const isArmLinux =
|
static const isArmLinux = bool.fromEnvironment("IS_ARM");
|
||||||
bool.fromEnvironment("IS_ARM");
|
|
||||||
static final isTestEnv = Platform.environment["FLUTTER_TEST"] == "true";
|
static final isTestEnv = Platform.environment["FLUTTER_TEST"] == "true";
|
||||||
Logging._();
|
Logging._();
|
||||||
static final Logging _instance = Logging._();
|
static final Logging _instance = Logging._();
|
||||||
|
@ -45,6 +44,7 @@ class Logging {
|
||||||
core.bool printToConsole = true,
|
core.bool printToConsole = true,
|
||||||
core.bool printFullLength = false,
|
core.bool printFullLength = false,
|
||||||
}) {
|
}) {
|
||||||
|
try {
|
||||||
if (isTestEnv || isArmLinux) {
|
if (isTestEnv || isArmLinux) {
|
||||||
Logger.print(object, normalLength: !printFullLength);
|
Logger.print(object, normalLength: !printFullLength);
|
||||||
return;
|
return;
|
||||||
|
@ -81,6 +81,11 @@ class Logging {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (e, s) {
|
||||||
|
print("problem trying to log");
|
||||||
|
print("$e $s");
|
||||||
|
Logger.print(object);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue