mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Bugfix] Fix Operator Logger NPE (#1011)
This commit is contained in:
parent
43ce62350e
commit
6c57529e2c
2 changed files with 8 additions and 0 deletions
|
@ -14,6 +14,7 @@
|
|||
- (Feature) OPS CLI with Arango Task
|
||||
- (Bugfix) Allow ArangoBackup Creation during Upload state
|
||||
- (Hotfix) Fix `ArangoDeployment` SubResource in CRD auto-installer
|
||||
- (Bugfix) Fix Operator Logger NPE
|
||||
|
||||
## [1.2.13](https://github.com/arangodb/kube-arangodb/tree/1.2.13) (2022-06-07)
|
||||
- (Bugfix) Fix arangosync members state inspection
|
||||
|
|
|
@ -63,6 +63,8 @@ const (
|
|||
initRetryWaitTime = 30 * time.Second
|
||||
)
|
||||
|
||||
var logger = logging.Global().RegisterAndGetLogger("operator", logging.Info)
|
||||
|
||||
type operatorV2type string
|
||||
|
||||
const (
|
||||
|
@ -129,6 +131,7 @@ func NewOperator(config Config, deps Dependencies) (*Operator, error) {
|
|||
deploymentReplications: make(map[string]*replication.DeploymentReplication),
|
||||
localStorages: make(map[string]*storage.LocalStorage),
|
||||
}
|
||||
o.log = logger.WrapObj(o)
|
||||
return o, nil
|
||||
}
|
||||
|
||||
|
@ -311,3 +314,7 @@ func (o *Operator) onStartOperatorV2(operatorType operatorV2type, stop <-chan st
|
|||
|
||||
<-stop
|
||||
}
|
||||
|
||||
func (o *Operator) WrapLogger(in *zerolog.Event) *zerolog.Event {
|
||||
return in.Str("namespace", o.Namespace)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue