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

Eventrouter logs not entirely in JSON #122

@artazar

Description

@artazar

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions