Enable debugPrint suppression in release mode
Uncommented the line that suppresses debugPrint output when not in debug mode and in release builds. Also updated socket address generation to use a temporary storage path from environment variables for non-TCP output.
This commit is contained in:
parent
17a397bb9f
commit
f8850a9be8
|
|
@ -122,7 +122,7 @@ void main(List<String> args) async {
|
||||||
Future prepareApp() async {
|
Future prepareApp() async {
|
||||||
if (!_args.contains("--debug") && isRelease) {
|
if (!_args.contains("--debug") && isRelease) {
|
||||||
// ignore: avoid_returning_null_for_void
|
// ignore: avoid_returning_null_for_void
|
||||||
//debugPrint = (String? message, {int? wrapWidth}) => null;
|
debugPrint = (String? message, {int? wrapWidth}) => null;
|
||||||
} else {
|
} else {
|
||||||
_args.remove("--debug");
|
_args.remove("--debug");
|
||||||
}
|
}
|
||||||
|
|
@ -222,7 +222,7 @@ Future<String?> runPythonApp(List<String> args) async {
|
||||||
'Python output TCP Server is listening on port ${outSocketServer.port}');
|
'Python output TCP Server is listening on port ${outSocketServer.port}');
|
||||||
socketAddr = "$tcpAddr:${outSocketServer.port}";
|
socketAddr = "$tcpAddr:${outSocketServer.port}";
|
||||||
} else {
|
} else {
|
||||||
socketAddr = "stdout_$pid.sock";
|
socketAddr = path.join(environmentVariables["FLET_APP_STORAGE_TEMP"], "stdout_$pid.sock");
|
||||||
if (await File(socketAddr).exists()) {
|
if (await File(socketAddr).exists()) {
|
||||||
await File(socketAddr).delete();
|
await File(socketAddr).delete();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue