Logger Options for ECS Compliance in Effect Typescript Library

Is there a Logger available that respects ECS (Elastic Common Schema)? Maybe an alternative to HttpMiddleware.logger from effect/platform, because it nicely logs every HTTP request and generates new spans for each request for me.

Or do I need to create a custom logger and use a third party library like Pino with an ECS processor?

I am using the Logger.json Live layer, which is close to ECS, but not fully ECS compliant. i.e. I get a logLevel field, which should be log.level.

Also, I can sort of add missing fields like the service name with, eg. Layer.annotateLogs("service.name", "my-service") and it will be included as annotations: { "service.name": "my-service" } field, but that isn't in accordance to ECS because the service name needs to be a top level field, like { "service.name": "my-service" } or even { service: { name: "my-service" } }.

I appreciate any help you can give me. thankyou
Was this page helpful?