mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
cleanup: move log functions to new internal/util/log package
Moving the log functions into its own internal/util/log package makes it possible to split out the humongous internal/util packages in further smaller pieces. This reduces the inter-dependencies between utility functions and components, preventing circular dependencies which are not allowed in Go. Updates: #852 Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
2036b587d7
commit
6d00b39886
@ -26,6 +26,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/ceph/ceph-csi/internal/util/log"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
"k8s.io/apimachinery/pkg/util/validation"
|
||||
"k8s.io/cloud-provider/volume/helpers"
|
||||
@ -216,7 +218,7 @@ func parseKernelRelease(release string) (int, int, int, int, error) {
|
||||
func CheckKernelSupport(release string, supportedVersions []KernelVersion) bool {
|
||||
version, patchlevel, sublevel, extraversion, err := parseKernelRelease(release)
|
||||
if err != nil {
|
||||
ErrorLogMsg("%v", err)
|
||||
log.ErrorLogMsg("%v", err)
|
||||
|
||||
return false
|
||||
}
|
||||
@ -242,7 +244,7 @@ func CheckKernelSupport(release string, supportedVersions []KernelVersion) bool
|
||||
}
|
||||
}
|
||||
}
|
||||
ErrorLogMsg("kernel %s does not support required features", release)
|
||||
log.ErrorLogMsg("kernel %s does not support required features", release)
|
||||
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user