Skip to content

Standardize JSON output ?  #504

@fmeriaux

Description

@fmeriaux

There are output differences between the 2 options for logging JSON.

These differences include different property names and output type : messages vs message and list(string) vs string for example.

Sources:
https://github.com/outr/scribe/blob/master/jsonFabric/shared/src/main/scala/scribe/json/ScribeFabricJsonSupport.scala#L38
https://github.com/outr/scribe/blob/master/jsonCirce/shared/src/main/scala/scribe/json/ScribeCirceJsonSupport.scala#L23

I propose to standardize around this format (which I think is fairly common):

{
    "timestamp":"1511814391023",
    "logger":"my.demo.logger",
    "message":"Hello world!", # group all messages to one
    "level":"INFO",
    "thread":"thread-name",
    "mdc": {
        "foo":"bar"
      },
    "stack_trace" : " traces ..."
   # etc...
}

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions