Skip to content

feature: setLoggingOptions method#3

Merged
fmorau merged 2 commits into
masterfrom
task/m-2843/disable-js-logs-when-logs-are-di
May 22, 2026
Merged

feature: setLoggingOptions method#3
fmorau merged 2 commits into
masterfrom
task/m-2843/disable-js-logs-when-logs-are-di

Conversation

@fmorau

@fmorau fmorau commented May 22, 2026

Copy link
Copy Markdown

Summary

Adds runtime Meteor logging configuration via Meteor.setLoggingOptions.

Changes

  • Added Meteor.setLoggingOptions({ isVerbose, isPrivate, logger }).
  • Propagated logging option updates to the active DDP instance.
  • Added runtime logging updates for the DDP message queue.
  • Registered the outgoing message:out logging hook regardless of initial isVerbose, so verbose logging can be enabled after Meteor.connect.
  • Exported MeteorLoggingOptions.
  • Documented runtime logging usage in README.
  • Added tests for DDP and Meteor runtime logging updates.

Motivation

Consumers can now enable/disable Meteor logs and switch private/full payload logging while the app is running, without reconnecting and disturbing the current DDP session.

Testing

  • npm run build
  • npm run lint
  • Targeted DDP logging tests ✅
  • Targeted Meteor.setLoggingOptions test ✅

npm run test:coverage currently fails on existing Random/Collection tests because the Node test environment does not expose the expected secure random generator. The failures are unrelated to this logging change.

Risk

Low. The behavior change is limited to internal logging configuration. The outgoing message listener is now always attached, but it exits immediately unless isVerbose is enabled.

@fmorau fmorau requested a review from iosDeveloperDenis May 22, 2026 15:26
@fmorau fmorau self-assigned this May 22, 2026
@fmorau

fmorau commented May 22, 2026

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fmorau fmorau merged commit 3f45dbe into master May 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants