Introduction
editIntroduction
editNode.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": "8.10.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?
If you’d like to try out a tutorial using Node.js ECS logging with winston, see Ingest logs from a Node.js web application using Filebeat.