Conversation
|
✅ Build Successful - Preview Images for this PR: Changed packages: |
There was a problem hiding this comment.
Pull request overview
Updates runtime configuration templates and refines the Logtape logger setup to better support multiple sinks with different log levels.
Changes:
- Updated
runtime/.env.templatedefaults/comments (including cache default) and removed duplicated entries. - Refactored
configureLoggerto compose enabled sinks and apply per-sink level filters while using a shared lowestLevel across categories.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| runtime/.env.template | Adjusts environment template defaults/comments and cleans up duplicate config lines. |
| lib/logger/index.ts | Composes console/OTEL sinks and adds per-sink level filtering with a unified per-category logger config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,17 +1,23 @@ | |||
| # ================ 系统 ===================== | |||
| PORT=3000 | |||
| AUTH_TOKEN=94d2c3e42bab07e9a6ea55ae790d493ba0e10e8a20052242ed0cb6298ebcdb4a | |||
There was a problem hiding this comment.
runtime/.env.template hard-codes a long AUTH_TOKEN value. Since lib/env.ts defaults AUTH_TOKEN to an empty string and other templates use obvious placeholders, keeping a realistic-looking token in the template can lead to people deploying with a known/shared token. Consider changing this to an empty value or a clear placeholder (and optionally add a short note that it must be set to a strong secret in real deployments).
| AUTH_TOKEN=94d2c3e42bab07e9a6ea55ae790d493ba0e10e8a20052242ed0cb6298ebcdb4a | |
| AUTH_TOKEN= # 必须在实际部署时设置为强随机密钥 |
No description provided.