From 6955f14c3ce41eb6ce93fb2df626a43d9e0e56c5 Mon Sep 17 00:00:00 2001 From: Maurycy Zarzycki Date: Sun, 20 Nov 2022 18:26:14 +0100 Subject: [PATCH] add a hidden config to disable Syncer logging to the console (#7049) --- core/modules/startup/startup.js | 6 +++++- .../hiddensettings/Hidden Setting SyncLogging.tid | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 editions/tw5.com/tiddlers/hiddensettings/Hidden Setting SyncLogging.tid diff --git a/core/modules/startup/startup.js b/core/modules/startup/startup.js index f681b71d1..e0990228f 100755 --- a/core/modules/startup/startup.js +++ b/core/modules/startup/startup.js @@ -121,7 +121,11 @@ exports.startup = function() { }); // Set up the syncer object if we've got a syncadaptor if($tw.syncadaptor) { - $tw.syncer = new $tw.Syncer({wiki: $tw.wiki, syncadaptor: $tw.syncadaptor}); + $tw.syncer = new $tw.Syncer({ + wiki: $tw.wiki, + syncadaptor: $tw.syncadaptor, + logging: $tw.wiki.getTiddlerText('$:/config/SyncLogging', "yes") === "yes" + }); } // Setup the saver handler $tw.saverHandler = new $tw.SaverHandler({ diff --git a/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting SyncLogging.tid b/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting SyncLogging.tid new file mode 100644 index 000000000..558cc2bf5 --- /dev/null +++ b/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting SyncLogging.tid @@ -0,0 +1,13 @@ +created: 20190903192324700 +modified: 20190903192324700 +tags: [[Hidden Settings]] +title: Hidden Setting: Sync Logging +type: text/vnd.tiddlywiki + +Specifies whether [[Syncadaptor|https://tiddlywiki.com/dev/#Syncadaptor]] should log information to the browser's developer console or not. + +Defaults to `yes`. Set to `no` to disable logging. + +Changing needs restart to take effect. + +$:/config/SyncLogging