Stefan de Vogelaere

Docs updated for logWriterCallback option

Showing 1 changed file with 16 additions and 0 deletions
@@ -474,6 +474,22 @@ Get.config( @@ -474,6 +474,22 @@ Get.config(
474 ) 474 )
475 ``` 475 ```
476 476
  477 +You can optionally redirect all the logging messages from Get. If you want to use your own favourite logging package and want to capture the logs there.
  478 +
  479 +```dart
  480 +GetMaterialApp(
  481 + enableLog: true,
  482 + logWriterCallback: localLogWriter,
  483 +);
  484 +
  485 +void localLogWriter(String text, {bool isError = false}) {
  486 + // pass the message to your favourite logging package here
  487 + // please note that even if enableLog: false log messages will be pushed in this callback
  488 + // you get check the flag if you want through GetConfig.isLogEnable
  489 +}
  490 +
  491 +```
  492 +
477 ## Video explanation of Other GetX Features 493 ## Video explanation of Other GetX Features
478 494
479 495