We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When there are panics in Argo CD components today, they're logged as plain text, even if JSON logging is enabled.
Example (manually added a panic for demonstration):
{"built":"1970-01-01T00:00:00Z","commit":"","level":"info","msg":"ArgoCD API Server is starting","namespace":"argocd","port":8080,"time":"2024-11-24T14:54:08-05:00","version":"v99.99.99+unknown"} panic: yikes goroutine 1 [running]: github.com/argoproj/argo-cd/v2/cmd/argocd-server/commands.NewCommand.func1(0x140008d0000?, {0x107c13006?, 0x4?, 0x107c1300a?}) /Users/mcrenshaw/go/src/github.com/argoproj/argo-cd/cmd/argocd-server/commands/argocd_server.go:129 +0x200 github.com/spf13/cobra.(*Command).execute(0x14000d70c08, {0x140001aa0b0, 0x9, 0x9}) /Users/mcrenshaw/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989 +0x828 github.com/spf13/cobra.(*Command).ExecuteC(0x14000d70c08) /Users/mcrenshaw/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 +0x344 github.com/spf13/cobra.(*Command).Execute(...) /Users/mcrenshaw/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041 main.main() /Users/mcrenshaw/go/src/github.com/argoproj/argo-cd/cmd/main.go:67 +0x364
Logging utilities work best when all the logs are in the same format.
Add a defer/recover to each long-lived Argo CD component to log the panic in the configured format.
The text was updated successfully, but these errors were encountered:
chore: log panics in JSON (argoproj#20924)
3adaad0
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
chore: log panics in JSON (#20924) (#20925)
6a09102
chore: log panics in JSON (argoproj#20924) (argoproj#20925)
6085707
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Adrian Aneci <aneci@adobe.com>
Successfully merging a pull request may close this issue.
Summary
When there are panics in Argo CD components today, they're logged as plain text, even if JSON logging is enabled.
Example (manually added a panic for demonstration):
Motivation
Logging utilities work best when all the logs are in the same format.
Proposal
Add a defer/recover to each long-lived Argo CD component to log the panic in the configured format.
The text was updated successfully, but these errors were encountered: