From a677da4337121c29232461f74c21d63533c88583 Mon Sep 17 00:00:00 2001 From: Matthias Fulz Date: Sun, 23 Aug 2020 01:49:14 +0200 Subject: [PATCH] slog update --- rpc.go | 2 +- server.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpc.go b/rpc.go index 06aa570..0cb331e 100644 --- a/rpc.go +++ b/rpc.go @@ -82,7 +82,7 @@ func (r *RPC) RegisterName(name string, rcvr interface{}) (err error) { } } else { if err = encoder.Encode(v.Interface().(error).Error()); err != nil { - slog.LOG_ERROR(err.Error()) + slog.LOG_ERRORLN(err) return nil, err } } diff --git a/server.go b/server.go index 7d4939a..647c555 100644 --- a/server.go +++ b/server.go @@ -170,7 +170,7 @@ func serverHandler(s *RPCServer) { func serverHandleConnection(s *RPCServer, conn io.ReadWriteCloser, clientAddr string) { defer func() { - slog.LOG_INFO("Client disconnected\n") + slog.LOG_INFOFLN("Client disconnected") s.stopWg.Done() }() @@ -218,7 +218,7 @@ func serverHandleConnection(s *RPCServer, conn io.ReadWriteCloser, clientAddr st return } - slog.LOG_DEBUG(fmt.Sprintln(msg.Data)) + slog.LOG_DEBUGLN(fmt.Sprint(msg.Data)) go func() { defer func() { clientConnsLock.Lock()