cordova-plugin-logtofile
Cordova plugin for writing logs to the filesystem.
Logger uses logback-android internally.
Installation
cordova plugin add cordova-plugin-logtofile
Usage
// setup a logfile path (required)// this path is relative to your device sdcard storage directorywindowlogToFile; // get the logfilePath from the currently running logger instancewindowlogToFile; // get the all archived logfile paths as arraywindowlogToFile; // write logmessages in different loglevelswindowlogToFile;windowlogToFile;windowlogToFile;windowlogToFile;
Logrotate
If the logfile exceeds a filesize above 5MB the current logfile will be archived and zipped into the current logfiledirectory. The last 3 archived logfiles will be retained, older logs get deleted.
The archived logfiles are reachable under the following filepattern: {logfiledirectory}/{logfilename}.{index}.zip
Currently supported Platforms
- Android
TODOs
- add more config options