Closed wendux closed 4 years ago
It would also be nice if the output could somehow be capture externally so we can write it to a file.
@wendux it's done. it would be nice to have it mentioned in your documentation.
@timrijckaert you can now provide your own logging function just like in the default dio logger.
I don't want a different output, I want the output you already have. However the way this lib is setup is that it does not expose this output.
Why not provide an optional delegate in the constructor which you can call with the same output as what you send to the console?
PrettyDioLogger(outputDelegate: (consoleLog) => ... );
@timrijckaert With the current setup, you can do exactly what you want
PrettydioLogger(logPrint : (logMessage) => // do what you want with the output );
// if you still need to log to the console, you can do something like this
PrettydioLogger(logPrint : (logMessage) {
print(logMessage);
// do what you want with the output
writeToFile(logMessage);
});
Awesome! I didn't see it!
We have released version 3.0 of Dio, could you support it ?We may archive this plugin in the Dio documentation after it supports Dio 3.0. thanks