@@ -44,7 +44,7 @@ EditorSocketIOServer.prototype.addClient = function (socket) {
44
44
socket . origin = 'operation' ;
45
45
self . mayWrite ( socket , function ( mayWrite ) {
46
46
if ( ! mayWrite ) {
47
- console . log ( "User doesn't have the right to edit." ) ;
47
+ logger . info ( "User doesn't have the right to edit." ) ;
48
48
return ;
49
49
}
50
50
try {
@@ -71,14 +71,14 @@ EditorSocketIOServer.prototype.addClient = function (socket) {
71
71
socket . origin = 'selection' ;
72
72
self . mayWrite ( socket , function ( mayWrite ) {
73
73
if ( ! mayWrite ) {
74
- console . log ( "User doesn't have the right to edit." ) ;
74
+ logger . info ( "User doesn't have the right to edit." ) ;
75
75
return ;
76
76
}
77
77
self . updateSelection ( socket , obj && Selection . fromJSON ( obj ) ) ;
78
78
} ) ;
79
79
} ) ;
80
80
socket . on ( 'disconnect' , function ( ) {
81
- //console.log ("Disconnect");
81
+ logger . debug ( "Disconnect" ) ;
82
82
socket . leave ( self . docId ) ;
83
83
self . onDisconnect ( socket ) ;
84
84
/*
@@ -106,7 +106,7 @@ EditorSocketIOServer.prototype.onOperation = function (socket, revision, operati
106
106
var clientId = socket . id ;
107
107
var wrappedPrime = this . receiveOperation ( revision , wrapped ) ;
108
108
if ( ! wrappedPrime ) return ;
109
- //console.log ("new operation: " + JSON.stringify(wrapped));
109
+ logger . debug ( "new operation: " + JSON . stringify ( wrapped ) ) ;
110
110
this . getClient ( clientId ) . selection = wrappedPrime . meta ;
111
111
revision = this . operations . length ;
112
112
socket . emit ( 'ack' , revision ) ;
@@ -161,4 +161,4 @@ EditorSocketIOServer.prototype.onDisconnect = function (socket) {
161
161
socket . broadcast . to ( this . docId ) . emit ( 'client_left' , clientId ) ;
162
162
} ;
163
163
164
- module . exports = EditorSocketIOServer ;
164
+ module . exports = EditorSocketIOServer ;
0 commit comments