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()