@@ -321,7 +321,6 @@ function _watch(ws, metadata) {
321321
322322 // Filter function to integrate with chokidar
323323 function isIgnored ( pathToFilter ) {
324- console . log ( `Watching: ${ fullPathToWatch } Filtering: ${ pathToFilter } ` ) ;
325324 if ( fullPathToWatch === pathToFilter ) {
326325 // if we are watching a file directly given file name, we don't run it though gitignore.
327326 // also we cant get relative path of gitignore with respect to a file as root.
@@ -331,15 +330,16 @@ function _watch(ws, metadata) {
331330 // Do not watch if the path given is not a subpath of our watched path.
332331 // if we are watching a file directly given file name, Then we get an isignored call for the parent
333332 // dir from chokidar.
333+ console . log ( `PhoenixFS: Watching: ${ fullPathToWatch } Filtered path: ${ pathToFilter } ` ) ;
334334 return true ;
335335 }
336336 const relativePath = path . relative ( fullPathToWatch , pathToFilter ) ;
337337 if ( anymatch ( ignoredPaths , pathToFilter ) ) {
338- debugMode && console . log ( "ignored watch path: " , pathToFilter , "rel: " , relativePath ) ;
338+ debugMode && console . log ( "PhoenixFS: anymatch ignored watch path: " , pathToFilter , "rel: " , relativePath ) ;
339339 return true ;
340340 }
341341 if ( relativePath && gitignore . ignores ( relativePath ) ) {
342- debugMode && console . log ( "ignored watch gitIgnore path: " , pathToFilter , "rel: " , relativePath ) ;
342+ debugMode && console . log ( "PhoenixFS: gitignore ignored watch gitIgnore path: " , pathToFilter , "rel: " , relativePath ) ;
343343 return true ;
344344 } else {
345345 return false ;
@@ -438,14 +438,14 @@ function processWSCommand(ws, metadata, dataBuffer) {
438438 _unwatch ( ws , metadata ) ;
439439 return ;
440440 case WS_COMMAND . LARGE_DATA_SOCKET_ANNOUNCE :
441- console . log ( "Large Data Transfer Socket established, socket Group: " , metadata . socketGroupID ) ;
441+ console . log ( "PhoenixFS: Large Data Transfer Socket established, socket Group: " , metadata . socketGroupID ) ;
442442 ws . isLargeData = true ;
443443 ws . socketGroupID = metadata . socketGroupID ;
444444 largeDataSocketMap [ metadata . socketGroupID ] = ws ;
445445 _sendResponse ( ws , metadata , { } , dataBuffer ) ;
446446 return ;
447447 case WS_COMMAND . CONTROL_SOCKET_ANNOUNCE :
448- console . log ( "Control Socket established, socket Group:" , metadata . socketGroupID ) ;
448+ console . log ( "PhoenixFS: Control Socket established, socket Group:" , metadata . socketGroupID ) ;
449449 ws . isLargeData = false ;
450450 ws . socketGroupID = metadata . socketGroupID ;
451451 controlSocketMap [ metadata . socketGroupID ] = ws ;
@@ -484,12 +484,12 @@ function CreatePhoenixFsServer(server, wssPath = "/phoenixFS") {
484484
485485 // Set up a connection listener
486486 wss . on ( 'connection' , ( ws ) => {
487- console . log ( 'Websocket Client connected' ) ;
487+ console . log ( 'PhoenixFS: Websocket Client connected' ) ;
488488 ws . binaryType = 'arraybuffer' ;
489489
490490 // Listen for messages from the client
491491 ws . on ( 'message' , ( message ) => {
492- debugMode && console . log ( `Received message ${ message } of size: ${ message . byteLength } , type: ${ typeof message } , isArrayBuffer: ${ message instanceof ArrayBuffer } , isBuffer: ${ Buffer . isBuffer ( message ) } ` ) ;
492+ debugMode && console . log ( `PhoenixFS: Received message ${ message } of size: ${ message . byteLength } , type: ${ typeof message } , isArrayBuffer: ${ message instanceof ArrayBuffer } , isBuffer: ${ Buffer . isBuffer ( message ) } ` ) ;
493493 processWebSocketMessage ( ws , message ) ;
494494 } ) ;
495495
@@ -499,10 +499,10 @@ function CreatePhoenixFsServer(server, wssPath = "/phoenixFS") {
499499 ws . on ( 'close' , ( ) => {
500500 if ( ws . isLargeData && ws . socketGroupID && largeDataSocketMap [ ws . socketGroupID ] === ws ) {
501501 delete largeDataSocketMap [ ws . socketGroupID ] ;
502- console . log ( 'Websocket Client disconnected: Large data Socket' ) ;
502+ console . log ( 'PhoenixFS: Websocket Client disconnected: Large data Socket' ) ;
503503 } else if ( ! ws . isLargeData && ws . socketGroupID && controlSocketMap [ ws . socketGroupID ] === ws ) {
504504 delete controlSocketMap [ ws . socketGroupID ] ;
505- console . log ( 'Websocket Client disconnected: control Socket' ) ;
505+ console . log ( 'PhoenixFS: Websocket Client disconnected: control Socket' ) ;
506506 }
507507 } ) ;
508508 } ) ;
0 commit comments