mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Clearer logging preparatory to implementing file synchronisation
This commit is contained in:
parent
7df3d48451
commit
70def07d63
@ -124,9 +124,7 @@ var Command = function(params,commander,callback) {
|
||||
if(fields["revision"]) {
|
||||
delete fields["revision"];
|
||||
}
|
||||
var fileInfo = $tw.boot.files[title],
|
||||
filepath = fileInfo ? fileInfo.filepath : null;
|
||||
console.log("PUT tiddler",title,filepath,fields)
|
||||
console.log("PUT tiddler",title)
|
||||
state.wiki.addTiddler(new $tw.Tiddler(fields,{title: title}));
|
||||
var changeCount = state.wiki.getChangeCount(title).toString();
|
||||
response.writeHead(204, "OK",{
|
||||
@ -140,9 +138,7 @@ console.log("PUT tiddler",title,filepath,fields)
|
||||
path: /^\/bags\/default\/tiddlers\/(.+)$/,
|
||||
handler: function(request,response,state) {
|
||||
var title = decodeURIComponent(state.params[0]);
|
||||
var fileInfo = $tw.boot.files[title],
|
||||
filepath = fileInfo ? fileInfo.filepath : null;
|
||||
console.log("DELETE tiddler",title,filepath)
|
||||
console.log("DELETE tiddler",title)
|
||||
state.wiki.deleteTiddler(title);
|
||||
response.writeHead(204, "OK");
|
||||
response.end();
|
||||
|
@ -46,7 +46,8 @@ Message logging
|
||||
Syncer.prototype.log = function(/* arguments */) {
|
||||
var args = Array.prototype.slice.call(arguments,0);
|
||||
args[0] = "Syncer: " + args[0];
|
||||
$tw.utils.log.apply(null,args);
|
||||
// Temporarily disable logging to help the wood vs. trees situation; we need better filtering of log messages
|
||||
//$tw.utils.log.apply(null,args);
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -27,7 +27,9 @@ FileSystemAdaptor.prototype.getTiddlerInfo = function(tiddler) {
|
||||
Save a tiddler and invoke the callback with (err,adaptorInfo,revision)
|
||||
*/
|
||||
FileSystemAdaptor.prototype.saveTiddler = function(tiddler,callback) {
|
||||
console.log("FileSystem: Saving",tiddler.fields);
|
||||
var filepathInfo = $tw.boot.files[tiddler.fields.title],
|
||||
filepath = filepathInfo ? $tw.boot.files[tiddler.fields.title].filepath : undefined;
|
||||
console.log("FileSystem: Saving",filepath,tiddler.fields);
|
||||
callback(null,{},0);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user