diff --git a/scripts/one-shot.js b/scripts/one-shot.js deleted file mode 100644 index 7712ea4..0000000 --- a/scripts/one-shot.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -const config = require("exp-config"); -config.logging.datadog.apiKey = ""; - -try { - const { buildLogger, logger } = require("../index"); - logger.info("Testing Datadog implementation in lu-logger - one-shot first"); - logger.info("Testing Datadog implementation in lu-logger - one-shot second"); - - const bLogger = buildLogger({ meta: { correlationId: "some-correlation-id", requesterName: "lu-logger", routingKey: "some-routing-key" } }); - - bLogger.info("Testing Datadog implementation with bLogger in lu-logger - one-shot first"); - bLogger.info("Testing Datadog implementation with bLogger in lu-logger - one-shot second"); -} catch (err) { - console.log(`Error: ${err}`); // eslint-disable-line -} diff --git a/test/feature/logging-feature.js b/test/feature/logging-feature.js index 065fdc0..ecc595b 100644 --- a/test/feature/logging-feature.js +++ b/test/feature/logging-feature.js @@ -365,16 +365,6 @@ Feature("Logging", () => { prometheusClient.register.resetMetrics(); }); - Given("Datadog is ready to receive our requests for logging", () => { - const serviceName = "lu-logger"; - const ddSource = "nodejs"; - const ddTags = encodeURIComponent("bn-department:bn-data,bn-env:non-prod,bn-env-specific:test,bn-app:lu-logger"); - nock("https://http-intake.logs.datadoghq.eu") - .post(`/v1/input/some-api-key?service=${serviceName}&ddsource=${ddSource}&ddtags=${ddTags}`) - .times(25) - .reply(204); - }); - When("initializing the logger and doing some string logging", () => { logger.error(message); @@ -431,15 +421,6 @@ Feature("Logging", () => { prometheusClient.register.resetMetrics(); }); - Given("Datadog is ready to receive our requests for logging", () => { - const serviceName = "lu-logger"; - const ddSource = "nodejs"; - const ddTags = encodeURIComponent("bn-department:bn-data,bn-env:non-prod,bn-env-specific:test,bn-app:lu-logger"); - nock("https://http-intake.logs.datadoghq.eu") - .post(`/v1/input/some-api-key?service=${serviceName}&ddsource=${ddSource}&ddtags=${ddTags}`) - .reply(204); - }); - When("initializing the logger and doing some string logging", () => { logger.error(message, { meta: { routingKey } }); });