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

Node: Automatic Context #46

Open
binarylogic opened this issue Mar 11, 2019 · 0 comments
Open

Node: Automatic Context #46

binarylogic opened this issue Mar 11, 2019 · 0 comments
Labels
enhancement New feature or request @timberio/node Node.js logger

Comments

@binarylogic
Copy link
Contributor

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.

@binarylogic binarylogic added enhancement New feature or request @timberio/node Node.js logger labels Mar 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request @timberio/node Node.js logger
Projects
None yet
Development

No branches or pull requests

1 participant