UnblockNeteaseMusic / UnblockNeteaseMusic/server

无法开启LOG_LEVEL=debug

Open
#1,464 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
7.8k
Forks
762
PR merge metrics
No merged PRs in 30d

Description

Bug 描述

window环境下无法使用nodejs开启LOG_LEVEL=debug

以下方法均失败:
方法1:直接cmd命令
set LOG_LEVEL=debug && node app.js
方法2:bat文件
set LOG_LEVEL=debug
node app.js
方法3:在server-enhanced目录下新建.env文件 使用node新增的对.env文件的支持
node --env-file=.env
方法4:
./src/logger.js直接修改level: process.env.LOG_LEVEL ?? 'info'为level: process.env.LOG_LEVEL ?? 'debug' 参考
方法5:
创建bat的快捷方式,在快捷方式添加环境变量LOG_LEVEL=debug

搞了半天以为是环境变量没生效,后来发现其它的环境变量都能设置成功,唯独LOG_LEVEL=debug不生效一直是info模式

预期行为

No response

实际行为

No response

复现步骤

No response

启动命令及环境变量

node --env-file=.env app.js

日志内容

网易云音乐歌曲链接

No response

网易云音乐版本号

2.x

操作系统

window x64

其他信息

No response

问题排查
  • 我确认我使用的核心是由 UnblockNeteaseMusic 项目官方发行,不是其他任何 fork。
  • 我确认我已经升级到了最新的核心版本(推荐使用最新构建而不是 release)。
  • 我确认我已经启用了 HTTPS 端口。
  • 我确认我已经正确设置了 EndPoint。
  • 我确认我已经在对应的客户端正确安装了 CA 证书。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/logger.js and reproduce the Windows launches using app.js, the listed cmd and bat commands, and node --env-file=.env. Trace why LOG_LEVEL remains at info instead of debug, then confirm the fix by verifying that a Windows launch produces debug-level logging.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.