slog update

This commit is contained in:
Matthias Fulz 2020-08-23 01:49:14 +02:00
parent 2ce41685ca
commit a677da4337
2 changed files with 3 additions and 3 deletions

2
rpc.go
View File

@ -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
}
}

View File

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