Skip to content

feat(logging): Rename encode-json flag to better convey its purpose  #857

@erezrokah

Description

@erezrokah

Is your feature request related to a problem? Please describe.

The encode-json only works when enable-console-log is enabled, see

if config.EncodeLogsAsJson {

However neither the name nor the description of the flag convey that it's related to the enable-console-log flag.
The description is enable JSON log format, instead of key/value. What I got from that is that it relates to the format of the log in general (e.g. the format for cloudquery.log).

Describe the solution you'd like

Maybe rename is to console-log-format with a default value of default and another possible value of json.

Update

Maybe better to have log-format=console and log-format=console-json

Describe alternatives you've considered

Maybe rename to console-log-as-json?

Additional context

Long distance relation to #854

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