问题
How can we maintain a error Log file (.txt) on a device for a phonegap based iOS and android application ? Just like we have error log file in native android applications. Is there any phone gap plugin available to maintain such logs in device only .
回答1:
There is a plugin (Android only) cordova-plugin-logtofile which seems to do what you need.
It can be also manually achieved by using core plugin cordova-plugin-file: Cordova Example: Writing to a file.
来源:https://stackoverflow.com/questions/32754105/how-can-we-maintain-a-error-log-file-txt-on-a-device-for-a-phonegap-based-ios