summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-11-13 23:59:56 +0100
committerGitHub2018-11-13 23:59:56 +0100
commitdf2a2e6c6c38a59b4cbabd95487dd6e9a35160e3 (patch)
treee843c6ea3a82d4bd1b8f8fcacbf26b529fa2a62e
parent54d3d930cf39c2a3bec422d858cbac20ad8118eb (diff)
parent694fb37aeab48b51513d04518c895702870cffb2 (diff)
Merge pull request #1054 from SISheogorath/fix/otLogging
Fix logging in ot module
-rwxr-xr-xlib/ot/editor-socketio-server.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ot/editor-socketio-server.js b/lib/ot/editor-socketio-server.js
index 7b204539..5014ac8d 100755
--- a/lib/ot/editor-socketio-server.js
+++ b/lib/ot/editor-socketio-server.js
@@ -44,7 +44,7 @@ EditorSocketIOServer.prototype.addClient = function (socket) {
socket.origin = 'operation';
self.mayWrite(socket, function (mayWrite) {
if (!mayWrite) {
- console.log("User doesn't have the right to edit.");
+ logger.info("User doesn't have the right to edit.");
return;
}
try {
@@ -71,14 +71,14 @@ EditorSocketIOServer.prototype.addClient = function (socket) {
socket.origin = 'selection';
self.mayWrite(socket, function (mayWrite) {
if (!mayWrite) {
- console.log("User doesn't have the right to edit.");
+ logger.info("User doesn't have the right to edit.");
return;
}
self.updateSelection(socket, obj && Selection.fromJSON(obj));
});
});
socket.on('disconnect', function () {
- //console.log("Disconnect");
+ logger.debug("Disconnect");
socket.leave(self.docId);
self.onDisconnect(socket);
/*
@@ -106,7 +106,7 @@ EditorSocketIOServer.prototype.onOperation = function (socket, revision, operati
var clientId = socket.id;
var wrappedPrime = this.receiveOperation(revision, wrapped);
if(!wrappedPrime) return;
- //console.log("new operation: " + JSON.stringify(wrapped));
+ logger.debug("new operation: " + JSON.stringify(wrapped));
this.getClient(clientId).selection = wrappedPrime.meta;
revision = this.operations.length;
socket.emit('ack', revision);
@@ -161,4 +161,4 @@ EditorSocketIOServer.prototype.onDisconnect = function (socket) {
socket.broadcast.to(this.docId).emit('client_left', clientId);
};
-module.exports = EditorSocketIOServer; \ No newline at end of file
+module.exports = EditorSocketIOServer;