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
{"level":"info","ts":1645719468.362505,"logger":"cmd","msg":"Go Version: go1.13.3"}
{"level":"info","ts":1645719468.362529,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1645719468.3625689,"logger":"cmd","msg":"Version of operator-sdk: v0.17.1"}
Then I have something like this, no more JSON:
E0224 19:34:48.369498 1 reflector.go:153] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:105: Failed to list *v1alpha1.Postgres: postgres.db.movetokube.com is forbidden: User "system:serviceaccount:kube-system:ext-postgres-operator" cannot list resource "postgres" in API
E0224 19:34:49.370236 1 reflector.go:153] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:105: Failed to list *unstructured.Unstructured: postgres.db.movetokube.com is forbidden: User "system:serviceaccount:kube-system:ext-postgres-operator" cannot list resource "postgres"
E0224 19:34:49.370302 1 reflector.go:153] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:105: Failed to list *unstructured.Unstructured: postgresusers.db.movetokube.com is forbidden: User "system:serviceaccount:kube-system:ext-postgres-operator" cannot list resource "post
And when I get some error to connect to the database, I get this in two lines:
2022/02/24 19:00:15 failed to connect to PostgreSQL server: parse postgresql://postgres:z6fxajZydUO6,x9QN=Hn=K-sdPsE^X@__REDACTED__/postgres?ssl=required
: net/url: invalid control character in URL
Proposal
Select a pattern and sitck to it.
You could go with JSON, that's easy to parse if anyone needs to make some processing before sending the logs somewhere.
If I may suggest, I'd go with something like logfmt.
The current logs are not following a pattern.
They start with JSON, which is nice.
Then I have something like this, no more JSON:
And when I get some error to connect to the database, I get this in two lines:
Proposal
Select a pattern and sitck to it.
You could go with JSON, that's easy to parse if anyone needs to make some processing before sending the logs somewhere.
If I may suggest, I'd go with something like
logfmt
.See:
The text was updated successfully, but these errors were encountered: