This is a pdf creation plugin for Phonegap 3.3.0 / Cordova 3.3.1 supporting Android (>=2.3.3). It writes all cordova javascript logs into a file in a public folder (Android: mnt/sdcard/, iOS: ~/Documents).
There are no JavaScript Methods (it´s hacked directly into the cordova log flow, "Usage below").
You may use phonegap CLI as follows:
➜ phonegap local plugin add https://github.com/moderna/cordova-plugin-log.git [phonegap] adding the plugin: https://github.com/moderna/cordova-plugin-log.git [phonegap] successfully added the plugin
ATTENTION: There is some manual work to be done before you can use this plugin!
- In edit the following variables to your liking:
private String logDir = ".at.modalog.cordova.plugin.log"; // prepending a dot "." makes the directory invisible
private String logFileName = "CordovaChromeClient.log";
private double logFileMaxSizeInKiloBytes = 512;
- Open your apps main.java file and add this import statement:
import at.modalog.cordova.plugin.log.CordovaChromeClientLog;
- Update your main.java file:
// deactivate the regular init
// super.init();
// modify init to use "CordovaChromeClientLog"
CordovaWebView webView = this.makeWebView();
super.init(webView, makeWebViewClient(webView), CordovaChromeClientLog.makeChromeClient(this, webView));
// ...
iOS is not yet supported.