CF Node.js Logging Support

Structured logging and request metrics for Node.js applications. Drop-in middleware for Express, Fastify, Connect and plain Node.js HTTP servers.


Features

Structured logs

Emits structured JSON log messages ready to be ingested by SAP Cloud Logging and SAP Application Logging Service. On Cloud Foundry, app, space, org and instance metadata are added automatically.

Request metrics

Plug-in middleware that captures latency, status codes, correlation IDs and tenant information for every HTTP request.

Configurable fields

Add custom fields, reduce sensitive data, override field names or swap in a completely custom log sink.

Child loggers & contexts

Create child loggers that inherit and extend a logging context, ideal for tracing a single request or transaction across multiple modules.

TypeScript ready

Full TypeScript typings are included.

Winston transport

Use the built-in Winston transport to route existing Winston log calls through the same structured pipeline.