add logging

This commit is contained in:
joshuaboud 2022-08-05 13:38:27 -03:00
parent f05017f85d
commit 6022e00dad
No known key found for this signature in database
GPG Key ID: 17EFB59E2A8BF50E

View File

@ -52,6 +52,7 @@ function FileSystemWatcher(path, options = {}, handlers = {}, defer=false) {
};
const handleEvent = (eventObj) => {
if (self.log) console.log('fsWatchEvent', eventObj);
if (options.ignoreSelf && eventObj.path === self.path)
return;
switch (eventObj.event) {
@ -122,7 +123,6 @@ function FileSystemWatcher(path, options = {}, handlers = {}, defer=false) {
fsWatchChannel = cockpit.channel({
payload: "fswatch1",
command: "open",
watch: true,
superuser: options.superuser ?? 'try',
host: self.host,
path: self.path,