Skip to content

Commit c851ec3

Browse files
committed
Update doc
1 parent 5d31ea2 commit c851ec3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/cmd.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ func executeMain(cmd *cobra.Command, args []string) {
279279
}
280280
logging.Global().ApplyLogLevels(levels)
281281

282+
podNameParts := strings.Split(name, "-")
283+
operatorID := podNameParts[len(podNameParts)-1]
284+
logging.Global().RegisterWrappers(func(in *zerolog.Event) *zerolog.Event {
285+
return in.Str("operator-id", operatorID)
286+
})
287+
282288
logger.Info("nice to meet you")
283289

284290
// Check operating mode

0 commit comments

Comments
 (0)