mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
feat: support log level in cmp plugin, possibility to trace generated manifest (#18851)
* feat: support log level in cmp plugin, and add possibility to trace generated manifest Signed-off-by: pashakostohrys <pavel@codefresh.io> * feat: support log level in cmp plugin, and add possibility to trace generated manifest Signed-off-by: pashakostohrys <pavel@codefresh.io> --------- Signed-off-by: pashakostohrys <pavel@codefresh.io>
This commit is contained in:
parent
9b3a4d150d
commit
1aa898cbb4
2 changed files with 5 additions and 2 deletions
|
|
@ -81,8 +81,8 @@ func NewCommand() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", "text", "Set the logging format. One of: text|json")
|
||||
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
|
||||
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", env.StringFromEnv("ARGOCD_CMP_SERVER_LOGFORMAT", "text"), "Set the logging format. One of: text|json")
|
||||
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", env.StringFromEnv("ARGOCD_CMP_SERVER_LOGLEVEL", "info"), "Set the logging level. One of: trace|debug|info|warn|error")
|
||||
command.Flags().StringVar(&configFilePath, "config-dir-path", common.DefaultPluginConfigFilePath, "Config management plugin configuration file location, Default is '/home/argocd/cmp-server/config/'")
|
||||
command.Flags().StringVar(&otlpAddress, "otlp-address", env.StringFromEnv("ARGOCD_CMP_SERVER_OTLP_ADDRESS", ""), "OpenTelemetry collector address to send traces to")
|
||||
command.Flags().BoolVar(&otlpInsecure, "otlp-insecure", env.ParseBoolFromEnv("ARGOCD_CMP_SERVER_OTLP_INSECURE", true), "OpenTelemetry collector insecure mode")
|
||||
|
|
|
|||
|
|
@ -240,6 +240,9 @@ func (s *Service) generateManifestGeneric(stream GenerateManifestStream) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("error generating manifests: %w", err)
|
||||
}
|
||||
|
||||
log.Tracef("Generated manifests result: %s", response.Manifests)
|
||||
|
||||
err = stream.SendAndClose(response)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error sending manifest response: %w", err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue