@@ -44,7 +44,7 @@ EditorSocketIOServer.prototype.addClient = function (socket) {
4444 socket . origin = 'operation' ;
4545 self . mayWrite ( socket , function ( mayWrite ) {
4646 if ( ! mayWrite ) {
47- console . log ( "User doesn't have the right to edit." ) ;
47+ logger . info ( "User doesn't have the right to edit." ) ;
4848 return ;
4949 }
5050 try {
@@ -71,14 +71,14 @@ EditorSocketIOServer.prototype.addClient = function (socket) {
7171 socket . origin = 'selection' ;
7272 self . mayWrite ( socket , function ( mayWrite ) {
7373 if ( ! mayWrite ) {
74- console . log ( "User doesn't have the right to edit." ) ;
74+ logger . info ( "User doesn't have the right to edit." ) ;
7575 return ;
7676 }
7777 self . updateSelection ( socket , obj && Selection . fromJSON ( obj ) ) ;
7878 } ) ;
7979 } ) ;
8080 socket . on ( 'disconnect' , function ( ) {
81- //console.log ("Disconnect");
81+ logger . debug ( "Disconnect" ) ;
8282 socket . leave ( self . docId ) ;
8383 self . onDisconnect ( socket ) ;
8484 /*
@@ -106,7 +106,7 @@ EditorSocketIOServer.prototype.onOperation = function (socket, revision, operati
106106 var clientId = socket . id ;
107107 var wrappedPrime = this . receiveOperation ( revision , wrapped ) ;
108108 if ( ! wrappedPrime ) return ;
109- //console.log ("new operation: " + JSON.stringify(wrapped));
109+ logger . debug ( "new operation: " + JSON . stringify ( wrapped ) ) ;
110110 this . getClient ( clientId ) . selection = wrappedPrime . meta ;
111111 revision = this . operations . length ;
112112 socket . emit ( 'ack' , revision ) ;
@@ -161,4 +161,4 @@ EditorSocketIOServer.prototype.onDisconnect = function (socket) {
161161 socket . broadcast . to ( this . docId ) . emit ( 'client_left' , clientId ) ;
162162} ;
163163
164- module . exports = EditorSocketIOServer ;
164+ module . exports = EditorSocketIOServer ;
0 commit comments