summaryrefslogtreecommitdiff
path: root/pkg/api/server
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-05-10 10:22:33 -0700
committerMatthew Heon <mheon@redhat.com>2021-05-25 15:15:50 -0400
commit18e917cdc361dc7f1badbce89b69e80a522062fe (patch)
tree9078508551d69e99db128613cb9ee8d06f6a09b6 /pkg/api/server
parentefa15b96c5d11796cdfbf2fdbe10664ec91b4c29 (diff)
downloadpodman-18e917cdc361dc7f1badbce89b69e80a522062fe.tar.gz
podman-18e917cdc361dc7f1badbce89b69e80a522062fe.tar.bz2
podman-18e917cdc361dc7f1badbce89b69e80a522062fe.zip
Downgrade API service routing table logging
[NO TESTS NEEDED] * Log the routing table output at Trace vs. Debug level. Reduce noise in debugging output. * Tweak SDNotify message to report Warn when it fails. Previously failures were silent. Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/api/server')
-rw-r--r--pkg/api/server/server.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go
index e23448fd1..972541bc6 100644
--- a/pkg/api/server/server.go
+++ b/pkg/api/server/server.go
@@ -136,7 +136,7 @@ func newServer(runtime *libpod.Runtime, duration time.Duration, listener *net.Li
}
}
- if logrus.IsLevelEnabled(logrus.DebugLevel) {
+ if logrus.IsLevelEnabled(logrus.TraceLevel) {
router.Walk(func(route *mux.Route, r *mux.Router, ancestors []*mux.Route) error { // nolint
path, err := route.GetPathTemplate()
if err != nil {
@@ -146,7 +146,7 @@ func newServer(runtime *libpod.Runtime, duration time.Duration, listener *net.Li
if err != nil {
methods = []string{"<N/A>"}
}
- logrus.Debugf("Methods: %6s Path: %s", strings.Join(methods, ", "), path)
+ logrus.Tracef("Methods: %6s Path: %s", strings.Join(methods, ", "), path)
return nil
})
}
@@ -162,13 +162,12 @@ func setupSystemd() {
if len(os.Getenv("NOTIFY_SOCKET")) == 0 {
return
}
- payload := fmt.Sprintf("MAINPID=%d", os.Getpid())
- payload += "\n"
+ payload := fmt.Sprintf("MAINPID=%d\n", os.Getpid())
payload += daemon.SdNotifyReady
if sent, err := daemon.SdNotify(true, payload); err != nil {
logrus.Errorf("Error notifying systemd of Conmon PID: %s", err.Error())
- } else if sent {
- logrus.Debugf("Notify sent successfully")
+ } else if !sent {
+ logrus.Warn("SDNotify not sent successfully")
}
if err := os.Unsetenv("INVOCATION_ID"); err != nil {