mirror of
https://github.com/containers/podman.git
synced 2025-12-11 09:18:34 +08:00
Drop default log-level from error to warn
Our users are missing certain warning messages that would make debugging issues with Podman easier. For example if you do a podman build with a Containerfile that contains the SHELL directive, the Derective is silently ignored. If you run with the log-level warn you get a warning message explainging what happened. $ podman build --no-cache -f /tmp/Containerfile1 /tmp/ STEP 1: FROM ubi8 STEP 2: SHELL ["/bin/bash", "-c"] STEP 3: COMMIT --> 7a207be102a 7a207be102aa8993eceb32802e6ceb9d2603ceed9dee0fee341df63e6300882e $ podman --log-level=warn build --no-cache -f /tmp/Containerfile1 /tmp/ STEP 1: FROM ubi8 STEP 2: SHELL ["/bin/bash", "-c"] STEP 3: COMMIT WARN[0000] SHELL is not supported for OCI image format, [/bin/bash -c] will be ignored. Must use `docker` format --> 7bd96fd25b9 7bd96fd25b9f755d8a045e31187e406cf889dcf3799357ec906e90767613e95f These messages will no longer be lost, when we default to WARNing level. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
6
vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go
generated
vendored
6
vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go
generated
vendored
@@ -149,7 +149,7 @@ func (plugin *cniNetworkPlugin) monitorConfDir(start *sync.WaitGroup) {
|
||||
for {
|
||||
select {
|
||||
case event := <-plugin.watcher.Events:
|
||||
logrus.Warningf("CNI monitoring event %v", event)
|
||||
logrus.Infof("CNI monitoring event %v", event)
|
||||
|
||||
var defaultDeleted bool
|
||||
createWrite := (event.Op&fsnotify.Create == fsnotify.Create ||
|
||||
@@ -295,7 +295,7 @@ func loadNetworks(confDir string, cni *libcni.CNIConfig) (map[string]*cniNetwork
|
||||
}
|
||||
}
|
||||
if len(confList.Plugins) == 0 {
|
||||
logrus.Warningf("CNI config list %s has no networks, skipping", confFile)
|
||||
logrus.Infof("CNI config list %s has no networks, skipping", confFile)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ func (plugin *cniNetworkPlugin) syncNetworkConfig() error {
|
||||
plugin.defaultNetName.name = defaultNetName
|
||||
logrus.Infof("Update default CNI network name to %s", defaultNetName)
|
||||
} else {
|
||||
logrus.Warnf("Default CNI network name %s is unchangeable", plugin.defaultNetName.name)
|
||||
logrus.Debugf("Default CNI network name %s is unchangeable", plugin.defaultNetName.name)
|
||||
}
|
||||
|
||||
plugin.networks = networks
|
||||
|
||||
Reference in New Issue
Block a user