summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-12-25 09:51:56 -0500
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-12-25 09:51:56 -0500
commit09ff4a27cf36131e197261ed2403dc24c1a9f7ab (patch)
tree7c28733e03299a48d5dd0cfa52671228f6dd7ab2 /www
parentcff53cddf9febd9b9e3a4bb2a0393b8cae2c2f67 (diff)
reduced log file size
Former-commit-id: f2a749f87caac2c96295740ea3327e2b95545d38
Diffstat (limited to 'www')
-rw-r--r--www/js/app.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/www/js/app.js b/www/js/app.js
index effafe63..1d81f958 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -36,7 +36,7 @@ angular.module('zmApp', [
largeHttpTimeout: 60000,
logFile: 'zmNinjaLog.txt',
authoremail: 'pliablepixels+zmNinja@gmail.com',
- logFileMaxSize: 50000, // after this limit log gets reset
+ logFileMaxSize: 10000, // after this limit log gets reset
loginInterval: 300000, //5m*60s*1000 - ZM auto login after 5 mins
updateCheckInterval: 86400000, // 24 hrs
loadingTimeout: 15000,
@@ -744,9 +744,10 @@ angular.module('zmApp', [
$fileLogger.checkFile().then(function (resp) {
if (parseInt(resp.size) > zm.logFileMaxSize) {
- console.log("Deleting old log file as it exceeds " + zm.logFileMaxSize + " bytes");
+
$fileLogger.deleteLogfile().then(function () {
console.log('Logfile deleted');
+
});
} else {
console.log("Log file size is " + resp.size + " bytes");
@@ -763,7 +764,9 @@ angular.module('zmApp', [
$fileLogger.setStorageFilename(zm.logFile);
// easier tz reading
$fileLogger.setTimestampFormat('medium');
-
+
+ ZMDataModel.zmLog("Deleting old log file as it exceeds " + zm.logFileMaxSize + " bytes");
+
if (window.cordova) {
// getAppVersion is a handy library
// that lets you extract the app version in config.xml