Skip to content

Commit 318966e

Browse files
committed
test(winston, pino): fix tests to exclude agent logging that collides
In APM agent 3.13.0 it started using pino logging by default. That affected one of the tests that intentionally starts the agent without a "serviceName"... which leads to a log.error from the agent... which broke the test that was looking for JSON-structured logging only from the test script.
1 parent 3646411 commit 318966e

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

loggers/pino/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"devDependencies": {
4040
"ajv": "^7.0.3",
4141
"ajv-formats": "^1.5.1",
42-
"elastic-apm-node": "^3.10.0",
42+
"elastic-apm-node": "^3.14.0",
4343
"express": "^4.17.1",
4444
"pino": "^6.0.0",
4545
"pino-http": "^5.3.0",

loggers/pino/test/use-apm-override-service-name.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ const apm = require('elastic-apm-node').start({
3333
serviceName,
3434
centralConfig: false,
3535
captureExceptions: false,
36-
metricsInterval: 0
36+
metricsInterval: 0,
37+
logLevel: 'off'
3738
})
3839

3940
const ecsFormat = require('../') // @elastic/ecs-pino-format

loggers/winston/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"ajv": "^7.0.3",
4242
"ajv-formats": "^1.5.1",
4343
"autocannon": "^7.0.1",
44-
"elastic-apm-node": "^3.10.0",
44+
"elastic-apm-node": "^3.14.0",
4545
"express": "^4.17.1",
4646
"split2": "^3.2.2",
4747
"standard": "16.x",

loggers/winston/test/use-apm-override-service-name.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ require('elastic-apm-node').start({
3131
serviceName,
3232
centralConfig: false,
3333
captureExceptions: false,
34-
metricsInterval: 0
34+
metricsInterval: 0,
35+
logLevel: 'off'
3536
})
3637

3738
const ecsFormat = require('../') // @elastic/ecs-winston-format

0 commit comments

Comments
 (0)