Merge pull request #10145 from thaJeztah/cri_startup_logs_step1
pkg/cri/server/base: use structured log for CRI plugin startup and log config as embedded JSON
This commit is contained in:
commit
b3dd6e3860
@ -99,7 +99,9 @@ func initCRIRuntime(ic *plugin.InitContext) (interface{}, error) {
|
|||||||
StateDir: stateDir,
|
StateDir: stateDir,
|
||||||
}
|
}
|
||||||
|
|
||||||
log.G(ctx).Infof("Start cri plugin with config %+v", c)
|
// Ignoring errors here; this should never fail.
|
||||||
|
cfg, _ := json.Marshal(c)
|
||||||
|
log.G(ctx).WithFields(log.Fields{"config": string(cfg)}).Info("starting cri plugin")
|
||||||
|
|
||||||
if err := setGLogLevel(); err != nil {
|
if err := setGLogLevel(); err != nil {
|
||||||
return nil, fmt.Errorf("failed to set glog level: %w", err)
|
return nil, fmt.Errorf("failed to set glog level: %w", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user