mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +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
@ -18,7 +18,7 @@ package controller
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/ceph/ceph-csi/internal/util"
|
||||
"github.com/ceph/ceph-csi/internal/util/log"
|
||||
|
||||
clientConfig "sigs.k8s.io/controller-runtime/pkg/client/config"
|
||||
"sigs.k8s.io/controller-runtime/pkg/manager"
|
||||
@ -65,19 +65,19 @@ func Start(config Config) error {
|
||||
}
|
||||
mgr, err := manager.New(clientConfig.GetConfigOrDie(), opts)
|
||||
if err != nil {
|
||||
util.ErrorLogMsg("failed to create manager %s", err)
|
||||
log.ErrorLogMsg("failed to create manager %s", err)
|
||||
|
||||
return err
|
||||
}
|
||||
err = addToManager(mgr, config)
|
||||
if err != nil {
|
||||
util.ErrorLogMsg("failed to add manager %s", err)
|
||||
log.ErrorLogMsg("failed to add manager %s", err)
|
||||
|
||||
return err
|
||||
}
|
||||
err = mgr.Start(signals.SetupSignalHandler())
|
||||
if err != nil {
|
||||
util.ErrorLogMsg("failed to start manager %s", err)
|
||||
log.ErrorLogMsg("failed to start manager %s", err)
|
||||
}
|
||||
|
||||
return err
|
||||
|
Reference in New Issue
Block a user