Introductionedit

Node.js ECS loggers are formatter plugins for your favorite logging libraries. They make it easy to format your logs into ECS-compatible JSON. In combination with filebeat you can send your logs directly to Elasticsearch and leverage Kibana’s Logs app to inspect all logs in one single place.

The Node.js ECS logging formatters log structured JSON and support serialization of Error objects and HTTP Request and Response objects from Node.js core and popular web frameworks. A minimal log record includes the following fields:

{
  "@timestamp": "2021-01-13T21:32:38.095Z",
  "log.level": "info",
  "message": "hi",
  "ecs": {"version":"1.6.0"}
}

Want to learn more about ECS, ECS logging, and other available language plugins? See the ECS logging guide.

Ready to jump into Node.js ECS logging?