feat: supports route-based service configuration#40
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Thank you for following the naming conventions! 🙏 |
commit: |
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds route-based service identification to the evlog logging system, enabling different service names to be associated with different API routes using glob patterns. This addresses issue #38 which requested the ability to differentiate log entries by service in multi-service architectures.
Changes:
- Added
routesconfiguration option to associate service names with route patterns using glob matching - Extended
useLoggerto accept an optional service parameter for explicit service name override - Updated documentation to explain service identification priority and usage patterns
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/evlog/src/runtime/server/useLogger.ts | Added optional service parameter to override default service name |
| packages/evlog/src/nuxt/module.ts | Added RouteConfig interface and routes option to module configuration |
| packages/evlog/src/nitro/plugin.ts | Implemented getServiceForPath function to match routes and apply service names |
| apps/playground/nuxt.config.ts | Added example route-based service configuration |
| apps/docs/content/1.getting-started/3.quick-start.md | Added Service Identification section with examples and priority documentation |
| apps/docs/content/1.getting-started/2.installation.md | Added Route-Based Service Configuration section with usage examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #38
This pull request introduces a new feature for route-based service identification in the logging system, allowing different service names to be associated with different API routes using glob patterns. This is particularly useful for multi-service or monolithic architectures that want to organize logs by business domain or service. The documentation and API have been updated to reflect these changes, and the
useLoggerfunction now supports explicit service name overrides.