mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-31 01:24:37 +02:00
add logging
This commit is contained in:
parent
f05017f85d
commit
6022e00dad
@ -52,6 +52,7 @@ function FileSystemWatcher(path, options = {}, handlers = {}, defer=false) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleEvent = (eventObj) => {
|
const handleEvent = (eventObj) => {
|
||||||
|
if (self.log) console.log('fsWatchEvent', eventObj);
|
||||||
if (options.ignoreSelf && eventObj.path === self.path)
|
if (options.ignoreSelf && eventObj.path === self.path)
|
||||||
return;
|
return;
|
||||||
switch (eventObj.event) {
|
switch (eventObj.event) {
|
||||||
@ -122,7 +123,6 @@ function FileSystemWatcher(path, options = {}, handlers = {}, defer=false) {
|
|||||||
fsWatchChannel = cockpit.channel({
|
fsWatchChannel = cockpit.channel({
|
||||||
payload: "fswatch1",
|
payload: "fswatch1",
|
||||||
command: "open",
|
command: "open",
|
||||||
watch: true,
|
|
||||||
superuser: options.superuser ?? 'try',
|
superuser: options.superuser ?? 'try',
|
||||||
host: self.host,
|
host: self.host,
|
||||||
path: self.path,
|
path: self.path,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user