Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thank you for following the naming conventions! 🙏 |
commit: |
There was a problem hiding this comment.
Pull request overview
This PR adds a silent mode to the evlog logging library that suppresses all console output while still building, sampling, and passing events to drains. It also fixes a drain pipeline issue where framework integrations could double-drain events by introducing a _deferDrain internal option, and adds a central configuration reference page to the documentation.
Changes:
- New
silentoption inLoggerConfigand framework-specific option interfaces (Nuxt, Nitro) that gates all console output behind a!globalSilentcheck - Deferred drain mechanism (
_deferDrain) to prevent double-draining: framework middleware defers the global drain at emit time and runs its own enrich+drain pipeline with full request context, falling back togetGlobalDrain()when no middleware drain is configured - Comprehensive configuration reference doc page and cross-references from all framework guide pages
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
packages/evlog/src/logger.ts |
Core silent mode flag, getGlobalDrain() export, deferDrain parameter in emitWideEvent, CreateLoggerInternalOptions |
packages/evlog/src/types.ts |
silent field added to LoggerConfig |
packages/evlog/src/shared/middleware.ts |
Uses _deferDrain, falls back to getGlobalDrain() in runEnrichAndDrain |
packages/evlog/src/next/handler.ts |
Uses _deferDrain, falls back to getGlobalDrain() in callEnrichAndDrain |
packages/evlog/src/nitro/plugin.ts |
Passes silent to initLogger, uses _deferDrain |
packages/evlog/src/nitro-v3/plugin.ts |
Passes silent to initLogger, uses _deferDrain |
packages/evlog/src/nitro.ts |
silent field in NitroModuleOptions and EvlogConfig |
packages/evlog/src/nuxt/module.ts |
silent field in ModuleOptions |
packages/evlog/test/logger.test.ts |
Comprehensive tests for silent mode |
packages/evlog/test/middleware.test.ts |
Tests for global drain fallback and no-double-drain |
apps/docs/content/3.core-concepts/7.configuration.md |
New central configuration reference page |
apps/docs/content/2.frameworks/*.md |
Cross-references to configuration page from all framework docs |
skills/evlog/SKILL.md, AGENTS.md, packages/evlog/README.md |
Documentation updates for silent option |
.changeset/silent-mode-drain-pipeline.md |
Changeset for the minor version bump |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This pull request introduces a new
silentmode to the library, allowing users to suppress all console output while still building, sampling, and draining events. It also improves the drain pipeline to prevent duplicate draining in framework integrations and adds a comprehensive configuration reference page to the documentation.Documentation across all supported frameworks has been updated to reference the new configuration options and central reference.