Skip to content
This repository was archived by the owner on Dec 8, 2020. It is now read-only.
This repository was archived by the owner on Dec 8, 2020. It is now read-only.

Node: Automatic Context #46

Description

@binarylogic

All of our libraries include automatic context to help identify where the logs are coming from. Critical pieces of data are:

  1. hostname
  2. pid

It should look something like this:

{
  "level": "info",
  "message": "Hello world",
  "context": {
    "system": {
      "hostname": "my.host.com",
      "ip": "123.3.34.33",
      "pid": 123432432
    }
}

The structure of context doesn't really matter. Timber no longer cares about a consistent schema, but this is the schema we use in our other libraries.

Let me know if we're missing anything else that might be relevant for the Node environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions