Skip to content

fix: Use string instead of reflect.Type as log field#396

Merged
smacker merged 1 commit intosrc-d:masterfrom
smacker:fix_event_type_log_field
Dec 7, 2018
Merged

fix: Use string instead of reflect.Type as log field#396
smacker merged 1 commit intosrc-d:masterfrom
smacker:fix_event_type_log_field

Conversation

@smacker
Copy link
Copy Markdown
Contributor

@smacker smacker commented Dec 7, 2018

With JSON formatter reflect.Type is formatted as "{}"

Example from staging logs:

{
    "app":"lookoutd",
    "event-id":"6052c4a4bda3c9807c9ec80c0955f85ee709a359",
    "event-type":{},
    "head":"refs/pull/395/head",
    "level":"info",
    "msg":"processing pull request",
    "provider":"github",
    "repo":"https://github.com/src-d/lookout.git",
    "source":"server/server.go:116",
    "time":"2018-12-07T10:57:47.489675762Z"
}

Signed-off-by: Maxim Sukharev max@smacker.ru

With JSON formatter reflect.Type is formatted as "{}"

Example from staging logs:
{
    "app":"lookoutd",
    "event-id":"6052c4a4bda3c9807c9ec80c0955f85ee709a359",
    "event-type":{},
    "head":"refs/pull/395/head",
    "level":"info",
    "msg":"processing pull request",
    "provider":"github",
    "repo":"https://github.com/src-d/lookout.git",
    "source":"server/server.go:116",
    "time":"2018-12-07T10:57:47.489675762Z"
}

Signed-off-by: Maxim Sukharev <max@smacker.ru>
@smacker smacker merged commit 3ab56f8 into src-d:master Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants