diff options
-rwxr-xr-x | nslcd_server/func_handlerequest.go.gen | 3 | ||||
-rw-r--r-- | nslcd_systemd/nslcd_systemd.go | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/nslcd_server/func_handlerequest.go.gen b/nslcd_server/func_handlerequest.go.gen index 8abfb01..53baae9 100755 --- a/nslcd_server/func_handlerequest.go.gen +++ b/nslcd_server/func_handlerequest.go.gen @@ -181,6 +181,7 @@ while read -r request; do maybePanic(p.Write(out, p.NSLCD_VERSION)) maybePanic(p.Write(out, action)) ch := backend.${request}(ctx, req) + n := 0 for result := range ch { if err == nil { err = p.Write(out, p.NSLCD_RESULT_BEGIN) @@ -188,6 +189,8 @@ while read -r request; do if err == nil { err = p.Write(out, result) } + n++ + log.Info(fmt.Sprintf("Wrote %d results / err = %v", n, err)) } maybePanic(err) maybePanic(p.Write(out, p.NSLCD_RESULT_END)) diff --git a/nslcd_systemd/nslcd_systemd.go b/nslcd_systemd/nslcd_systemd.go index c0024e2..c05b0e9 100644 --- a/nslcd_systemd/nslcd_systemd.go +++ b/nslcd_systemd/nslcd_systemd.go @@ -107,12 +107,13 @@ func handler(backend nslcd_server.Backend, limits nslcd_server.Limits, conn *net Logger: nslcd_server.LoggerFromContext(ctx), } ctx = context.WithValue(ctx, nslcd_server.LoggerKey, log) + defer log.Info("Connection closed") cred, err := getpeercred(conn) if err != nil { - log.Debug("Connection from unknown client") + log.Info("Connection from unknown client") } else { - log.Debug(fmt.Sprintf("Connection from pid=%v uid=%v gid=%v", + log.Info(fmt.Sprintf("Connection from pid=%v uid=%v gid=%v", cred.Pid, cred.Uid, cred.Gid)) ctx = context.WithValue(ctx, nslcd_server.PeerCredKey, cred) } |