From c441d89596070955946f32635006525d8a69d753 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 13 Aug 2019 15:58:08 +0200 Subject: [PATCH] fix(core): update --- ts/smartsocket.classes.smartsocketclient.ts | 4 ++-- ts/smartsocket.classes.socketfunction.ts | 1 - ts/smartsocket.classes.socketserver.ts | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ts/smartsocket.classes.smartsocketclient.ts b/ts/smartsocket.classes.smartsocketclient.ts index c6ee407..945785a 100644 --- a/ts/smartsocket.classes.smartsocketclient.ts +++ b/ts/smartsocket.classes.smartsocketclient.ts @@ -58,14 +58,14 @@ export class SmartsocketClient { socket: plugins.socketIoClient(socketUrl, { multiplex: false }) }); this.socketConnection.socket.on('requestAuth', () => { - console.log('server requested authentication'); + plugins.smartlog.defaultLogger.log('info', 'server requested authentication'); this.socketConnection.socket.emit('dataAuth', { role: this.socketRole.name, password: this.socketRole.passwordHash, alias: this.alias }); this.socketConnection.socket.on('authenticated', () => { - console.log('client is authenticated'); + plugins.smartlog.defaultLogger.log('info', 'client is authenticated'); this.socketConnection.authenticated = true; this.socketConnection.listenToFunctionRequests(); done.resolve(); diff --git a/ts/smartsocket.classes.socketfunction.ts b/ts/smartsocket.classes.socketfunction.ts index de822b1..35bafd2 100644 --- a/ts/smartsocket.classes.socketfunction.ts +++ b/ts/smartsocket.classes.socketfunction.ts @@ -42,7 +42,6 @@ export class SocketFunction { smartsocketRefArg: Smartsocket | SmartsocketClient, functionNameArg: string ): SocketFunction { - console.log(smartsocketRefArg.socketFunctions); return smartsocketRefArg.socketFunctions.find(socketFunctionArg => { return socketFunctionArg.name === functionNameArg; }); diff --git a/ts/smartsocket.classes.socketserver.ts b/ts/smartsocket.classes.socketserver.ts index b35f48d..a8bd42d 100644 --- a/ts/smartsocket.classes.socketserver.ts +++ b/ts/smartsocket.classes.socketserver.ts @@ -54,11 +54,11 @@ export class SocketServer { // in case an external server has been set "this.standaloneServer" should be false if (this.httpServer && this.standaloneServer) { if (!this.smartsocket.options.port) { - console.log('there should be a port specifed for smartsocket!'); + plugins.smartlog.defaultLogger.log('error', 'there should be a port specifed for smartsocket!'); throw new Error('there should be a port specified for smartsocket'); } this.httpServer.listen(this.smartsocket.options.port, () => { - console.log(`Server started in standalone mode on ${this.smartsocket.options.port}`); + plugins.smartlog.defaultLogger.log('success', `Server started in standalone mode on ${this.smartsocket.options.port}`); done.resolve(); }); } else {