Skip to content

Error log file is not a valid JSON #920

@none23

Description

@none23

The writeErrorLogFile function outbuts errors as a sequence of concatenated stringified JSON objects instead of an array. That makes the resulting .json log file invalid.

E.g. the exampleErrorLog from tests results in the following log file:

{"ts":"2018-01-01T00:01:43.000Z","level":"warning","warning":"warning text"}{"ts":"2018-02-02T01:02:22.000Z","level":"error","error":{}}

Instead it would be nice for the output to be actual JSON:

[{"ts":"2018-01-01T00:01:43.000Z","level":"warning","warning":"warning text"},{"ts":"2018-02-02T01:02:22.000Z","level":"error","error":{}}]

The issue is mildly annoying, because the contentful-cli error logs require pre-processing to be parsed

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