Skip to content

Tweak handling of DO_NOT_LOG in production.#600

Merged
rkistner merged 1 commit intomainfrom
tweak-log-filtering
Apr 13, 2026
Merged

Tweak handling of DO_NOT_LOG in production.#600
rkistner merged 1 commit intomainfrom
tweak-log-filtering

Conversation

@rkistner
Copy link
Copy Markdown
Contributor

@rkistner rkistner commented Apr 10, 2026

Follow-up to #593, relating to this comment.

This handles these log issues more gracefully when running into the issue in production. Essentially, if a log line slips through that we did not pick up during local runs or automated testing, the filtering should not cause a cascading failure. This still keeps the hard error during development testing, so that automated testing can pick up these issues as far as possible.

The specific case in #585 is actually a good example of this:

  1. The test in service-core does not use module-mongodb-storage and uses a mock logger, so does not run into the case of logging db.
  2. The tests in module-mongodb-storage does not cover this specific case logging the message.

So the automated tests never pick up this logging issue, but it is easily triggered in production.

Note that we have NODE_ENV=production in all our docker images, so it's a fairly safe check here.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 10, 2026

⚠️ No Changeset found

Latest commit: f959f24

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rkistner rkistner merged commit 04040f2 into main Apr 13, 2026
44 checks passed
@rkistner rkistner deleted the tweak-log-filtering branch April 13, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants