-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Labels
agent-nodejsMake available for APM Agents project planning.Make available for APM Agents project planning.
Description
Using v1.3.0 of ecs-pino-format, I get the following output for a message:
{
"log.level": "info",
"@timestamp": "2021-08-26T14:45:06.489Z",
"labels": {
"env": "prod",
"app": "test"
},
"service": {
"name": "test"
},
"tags": [
"audit"
],
"ecs": {
"version": "1.6.0"
},
"message": "Hello world"
}But, it seems like log.level should be an Object instead of a string key, like:
{
"log": {
"level": "info"
},
"@timestamp": "2021-08-26T14:46:10.475Z",
"labels": {
"env": "prod",
"app": "test"
},
"service": {
"name": "test"
},
"tags": [
"audit"
],
"ecs": {
"version": "1.6.0"
},
"message": "Hello world"
}Below is the example program in TypeScript I was using to test:
import ecsFormat from "@elastic/ecs-pino-format";
import pino from "pino";
const log = pino({
base: {
labels: {
env: "prod",
app: "test",
},
service: {
name: "test",
},
tags: ["audit"],
},
...ecsFormat(),
});
log.info("Hello world");Metadata
Metadata
Assignees
Labels
agent-nodejsMake available for APM Agents project planning.Make available for APM Agents project planning.