Jonny Borges
Committed by GitHub

Merge pull request #484 from stefandevo/master

Docs updated for logWriterCallback option
... ... @@ -482,6 +482,22 @@ Get.config(
)
```
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.
```dart
GetMaterialApp(
enableLog: true,
logWriterCallback: localLogWriter,
);
void localLogWriter(String text, {bool isError = false}) {
// pass the message to your favourite logging package here
// please note that even if enableLog: false log messages will be pushed in this callback
// you get check the flag if you want through GetConfig.isLogEnable
}
```
## Video explanation of Other GetX Features
... ...
... ... @@ -473,6 +473,22 @@ Get.config(
)
```
É possível redirecionar todas as mensagens de log do GetX. Útil quando se tem um package de logging e vc quer que ele lide com todos os logs
```dart
GetMaterialApp(
enableLog: true,
logWriterCallback: localLogWriter,
);
void localLogWriter(String text, {bool isError = false}) {
// passage a mensagem para seu package de logging favorito aqui
// Obs: mesmo que as mensagens de log estejam desativadas
// com o comando "enableLog: false", as mensagens ainda vão passar por aqui
// Você precisa checar essa config manualmente aqui se quiser respeitá-la
}
```
## Video explanation of Other GetX Features
... ...