getx icon indicating copy to clipboard operation
getx copied to clipboard

How to turn off log printing

Open mdddj opened this issue 2 years ago • 2 comments

image

Hi,I don't want to print these logs in console, is there something that can be done

mdddj avatar Jun 18 '22 01:06 mdddj

image enableLog to false inside GetmaterialApp

GauravCalidig avatar Jun 18 '22 04:06 GauravCalidig

I have enableLog: false in my GetMaterialApp declaration and the logs still show. I'm on GetX 4.6.5.

cliftonlabrum avatar Sep 01 '22 22:09 cliftonlabrum

I have enableLog: false in my GetMaterialApp declaration and the logs still show. I'm on GetX 4.6.5.

Me too.

mgesmundo avatar Oct 19 '22 12:10 mgesmundo

Just to offer a workaround: Get.isLogEnable = false; seemed to work for me (not using a GetMaterialApp though).

maltemedocs avatar Dec 13 '22 13:12 maltemedocs

is there a specific point where i need to put Get.isLogEnable = false;? i found it didn't work for me putting before the GetMaterialApp or putting before i runApp (right before i initialize with Get.put).

matthewkooshad avatar Jul 03 '23 00:07 matthewkooshad

@matthewkooshad I had placed it early. The app had a main -> runZonedGuarded -> runApp flow. I did put the Get.isLogEnable = false; into the runZonedGuarded function, a bit before runApp. So that was after WidgetsFlutterBinding.ensureInitialized(), initializing Firebase and EasyLocalization and such, but before a first Get.put() and before runApp.

But that app did not use GetMaterialApp, so it is possible it won't work for you. Or that it only worked with some other changes I'm not aware of anymore :/

maltemedocs avatar Jul 03 '23 08:07 maltemedocs