mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-25 19:17:19 +00:00
Further reduce syncer logging
The rationale is that the deeper logs are only useful for debugging the syncer logic, and are overwhelming for most users
This commit is contained in:
parent
f56f5dcc56
commit
622512c380
@ -189,7 +189,6 @@ Syncer.prototype.readTiddlerInfo = function() {
|
|||||||
// Record information for known tiddlers
|
// Record information for known tiddlers
|
||||||
var self = this,
|
var self = this,
|
||||||
tiddlers = this.getSyncedTiddlers();
|
tiddlers = this.getSyncedTiddlers();
|
||||||
// this.logger.log("Initialising tiddlerInfo for " + tiddlers.length + " tiddlers");
|
|
||||||
$tw.utils.each(tiddlers,function(title) {
|
$tw.utils.each(tiddlers,function(title) {
|
||||||
var tiddler = self.wiki.getTiddler(title);
|
var tiddler = self.wiki.getTiddler(title);
|
||||||
if(tiddler) {
|
if(tiddler) {
|
||||||
@ -236,7 +235,6 @@ Syncer.prototype.isDirty = function() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var dirtyStatus = checkIsDirty();
|
var dirtyStatus = checkIsDirty();
|
||||||
this.logger.log("Dirty status was " + dirtyStatus);
|
|
||||||
return dirtyStatus;
|
return dirtyStatus;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -266,7 +264,6 @@ Syncer.prototype.storeTiddler = function(tiddlerFields) {
|
|||||||
adaptorInfo: this.syncadaptor.getTiddlerInfo(tiddler),
|
adaptorInfo: this.syncadaptor.getTiddlerInfo(tiddler),
|
||||||
changeCount: this.wiki.getChangeCount(tiddlerFields.title)
|
changeCount: this.wiki.getChangeCount(tiddlerFields.title)
|
||||||
};
|
};
|
||||||
this.logger.log("Updating tiddler info in syncer.storeTiddler for " + tiddlerFields.title + " " + JSON.stringify(this.tiddlerInfo[tiddlerFields.title]));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Syncer.prototype.getStatus = function(callback) {
|
Syncer.prototype.getStatus = function(callback) {
|
||||||
@ -431,7 +428,6 @@ Syncer.prototype.processTaskQueue = function() {
|
|||||||
if((!this.syncadaptor.isReady || this.syncadaptor.isReady()) && this.numTasksInProgress === 0) {
|
if((!this.syncadaptor.isReady || this.syncadaptor.isReady()) && this.numTasksInProgress === 0) {
|
||||||
// Choose the next task to perform
|
// Choose the next task to perform
|
||||||
var task = this.chooseNextTask();
|
var task = this.chooseNextTask();
|
||||||
// self.logger.log("Chosen next task " + task);
|
|
||||||
// Perform the task if we had one
|
// Perform the task if we had one
|
||||||
if(typeof task === "object" && task !== null) {
|
if(typeof task === "object" && task !== null) {
|
||||||
this.numTasksInProgress += 1;
|
this.numTasksInProgress += 1;
|
||||||
@ -557,14 +553,12 @@ SaveTiddlerTask.prototype.run = function(callback) {
|
|||||||
revision: revision,
|
revision: revision,
|
||||||
timestampLastSaved: new Date()
|
timestampLastSaved: new Date()
|
||||||
};
|
};
|
||||||
// self.syncer.logger.log("Updating tiddler info in SaveTiddlerTask.run for " + self.title + " " + JSON.stringify(self.syncer.tiddlerInfo[self.title]));
|
|
||||||
// Invoke the callback
|
// Invoke the callback
|
||||||
callback(null);
|
callback(null);
|
||||||
},{
|
},{
|
||||||
tiddlerInfo: self.syncer.tiddlerInfo[self.title]
|
tiddlerInfo: self.syncer.tiddlerInfo[self.title]
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// this.syncer.logger.log(" Not Dispatching 'save' task:",this.title,"tiddler does not exist");
|
|
||||||
$tw.utils.nextTick(callback(null));
|
$tw.utils.nextTick(callback(null));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -588,7 +582,6 @@ DeleteTiddlerTask.prototype.run = function(callback) {
|
|||||||
return callback(err);
|
return callback(err);
|
||||||
}
|
}
|
||||||
// Remove the info stored about this tiddler
|
// Remove the info stored about this tiddler
|
||||||
// self.syncer.logger.log("Deleting tiddler info in DeleteTiddlerTask.run for " + self.title);
|
|
||||||
delete self.syncer.tiddlerInfo[self.title];
|
delete self.syncer.tiddlerInfo[self.title];
|
||||||
// Invoke the callback
|
// Invoke the callback
|
||||||
callback(null);
|
callback(null);
|
||||||
@ -642,7 +635,6 @@ SyncFromServerTask.prototype.run = function(callback) {
|
|||||||
callback(null);
|
callback(null);
|
||||||
};
|
};
|
||||||
if(this.syncer.syncadaptor.getUpdatedTiddlers) {
|
if(this.syncer.syncadaptor.getUpdatedTiddlers) {
|
||||||
self.syncer.logger.log("Retrieving updated tiddler list");
|
|
||||||
this.syncer.syncadaptor.getUpdatedTiddlers(self,function(err,updates) {
|
this.syncer.syncadaptor.getUpdatedTiddlers(self,function(err,updates) {
|
||||||
if(err) {
|
if(err) {
|
||||||
self.syncer.displayError($tw.language.getString("Error/RetrievingSkinny"),err);
|
self.syncer.displayError($tw.language.getString("Error/RetrievingSkinny"),err);
|
||||||
@ -663,9 +655,7 @@ SyncFromServerTask.prototype.run = function(callback) {
|
|||||||
return successCallback();
|
return successCallback();
|
||||||
});
|
});
|
||||||
} else if(this.syncer.syncadaptor.getSkinnyTiddlers) {
|
} else if(this.syncer.syncadaptor.getSkinnyTiddlers) {
|
||||||
this.syncer.logger.log("Retrieving skinny tiddler list");
|
|
||||||
this.syncer.syncadaptor.getSkinnyTiddlers(function(err,tiddlers) {
|
this.syncer.syncadaptor.getSkinnyTiddlers(function(err,tiddlers) {
|
||||||
// self.syncer.logger.log("Retrieved skinny tiddler list");
|
|
||||||
// Check for errors
|
// Check for errors
|
||||||
if(err) {
|
if(err) {
|
||||||
self.syncer.displayError($tw.language.getString("Error/RetrievingSkinny"),err);
|
self.syncer.displayError($tw.language.getString("Error/RetrievingSkinny"),err);
|
||||||
|
Loading…
Reference in New Issue
Block a user