You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add log setter for text or JSON log formatting
- Add CLI option "--log-format", accepts "text" or "json"
- Defaults to current "text" logging for compatibility
Additionally:
- Configure `cmd` go.mod to reference registry-scanner locally to support concurrent changes in both modules
Signed-off-by: Michael Pilat <[email protected]>
runCmd.Flags().BoolVar(&cfg.DryRun, "dry-run", false, "run in dry-run mode. If set to true, do not perform any changes")
323
334
runCmd.Flags().DurationVar(&cfg.CheckInterval, "interval", env.GetDurationVal("IMAGE_UPDATER_INTERVAL", 2*time.Minute), "interval for how often to check for updates")
324
335
runCmd.Flags().StringVar(&cfg.LogLevel, "loglevel", env.GetStringVal("IMAGE_UPDATER_LOGLEVEL", "info"), "set the loglevel to one of trace|debug|info|warn|error")
336
+
runCmd.Flags().StringVar(&cfg.LogFormat, "log-format", env.GetStringVal("IMAGE_UPDATER_LOG_FORMAT", "text"), "set the log format to one of text|json")
325
337
runCmd.Flags().StringVar(&kubeConfig, "kubeconfig", "", "full path to kubernetes client configuration, i.e. ~/.kube/config")
326
338
runCmd.Flags().IntVar(&cfg.HealthPort, "health-port", 8080, "port to start the health server on, 0 to disable")
327
339
runCmd.Flags().IntVar(&cfg.MetricsPort, "metrics-port", 8081, "port to start the metrics server on, 0 to disable")
0 commit comments