Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Eventrouter logs not entirely in JSON #122

Open
artazar opened this issue Dec 18, 2020 · 1 comment
Open

Eventrouter logs not entirely in JSON #122

artazar opened this issue Dec 18, 2020 · 1 comment

Comments

@artazar
Copy link

artazar commented Dec 18, 2020

Hi,

I have not found any answer to this question, so let me try to ask explicitly.

Eventrouter logs are not entirely JSON formatted, there are extra snippets on each line start, e.g.:

I1218 03:57:15.070052       1 glogsink.go:42] {"verb":"UPDATED","event":{"metadata":{"name":"test.163125c58efe671a","namespace":"test","selfLink":"/api/v1/namespaces/test/events/test.163125c58efe671a","uid":"ccedaf9a-c4cf-4d90-8e3c-832bbc9c636f","resourceVersion":"50255381","creationTimestamp":"2020-09-03T02:41:13Z"},"involvedObject":{"kind":"CronJob","namespace":"test","name":"test","uid":"3b8ce64e-3175-4a02-af39-a3d0cfdb7bda","apiVersion":"batch/v1beta1","resourceVersion":"232139"},"reason":"SawCompletedJob","message":"(combined from similar events): Saw completed job: test-1608263820, status: Complete","source":{"component":"cronjob-controller"},"firstTimestamp":"2020-09-03T02:41:13Z","lastTimestamp":"2020-12-18T03:57:14Z","count":152717,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""},"old_event":{"metadata":{"name":"test.163125c58efe671a","namespace":"test","selfLink":"/api/v1/namespaces/test/events/test.163125c58efe671a","uid":"ccedaf9a-c4cf-4d90-8e3c-832bbc9c636f","resourceVersion":"50253698","creationTimestamp":"2020-09-03T02:41:13Z"},"involvedObject":{"kind":"CronJob","namespace":"test","name":"test","uid":"3b8ce64e-3175-4a02-af39-a3d0cfdb7bda","apiVersion":"batch/v1beta1","resourceVersion":"232139"},"reason":"SawCompletedJob","message":"(combined from similar events): Saw completed job: test-1608263520, status: Complete","source":{"component":"cronjob-controller"},"firstTimestamp":"2020-09-03T02:41:13Z","lastTimestamp":"2020-12-18T03:52:13Z","count":152712,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""}}

Is there any possibility to remove this part?

I1218 03:57:15.070052       1 glogsink.go:42] 

This would obviously greatly simplify log parsing.

Thanks!

@KouriR
Copy link

KouriR commented Feb 18, 2021

Try changing the sink configuration option from glog to stdout.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants