Skip to content

feat: support JSON as a log format #42

@Myroslav-mint

Description

@Myroslav-mint

Summary

What:

Extend logger.error('My error') and give the possibility to pass a JSON (or serializable JS object) as a log value.

Why:

For example, in Python world, they have standardized loggers that accept a custom JSON as a log value that gives a possibility to aggregate logs handily with the help of third-party tools such as DataDog etc.

Acceptance Criteria

Below is a list of tasks that must be completed before this issue can be closed.

  • Write documentation
  • Write unit tests
  • Write integration tests

Example Pseudo Code (for implementation)

logger.error({
  "name": "Custom error",
  "reason": "Not valid data"
})

logger.info({
  "name": "User action",
  "action": "Click the checkout button"
})

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