create: 移动调试日志用总开关

MemRelay-Operation: memory-save:cmnet-debug-switch-20261016
MemRelay-Resource: 50c64806-cd38-4d15-bafc-88c495ae2995
This commit is contained in:
2026-10-16 15:39:20 +08:00
parent dc0f602207
commit 48c326bef9
@@ -0,0 +1,20 @@
---
title: 移动调试日志用总开关
type: decision
permalink: main/projects/e09440d3-e175-4bbb-96a9-253dc56dc51a/移动调试日志用总开关
stable_id: 50c64806-cd38-4d15-bafc-88c495ae2995
scope: project
memory_type: decision
project_id: e09440d3-e175-4bbb-96a9-253dc56dc51a
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
status: active
revision: 1
request_id: cmnet-debug-switch-20261016
created_at: '2026-10-16T07:39:17.462448+00:00'
updated_at: '2026-10-16T07:39:17.462448+00:00'
tags:
- cmnet
- debug
---
CMNETSMSInfo 的调试输出只由 internal/cmnet/debug.go 里的 const debugEnabled 控制,默认 false。关闭时 debugf、debugCookies、debugBody、debugRequest 直接返回,不删调用点。打开时本地日志可含手机号、验证码、Cookie、密钥,不写入 MemRelay 或用户回复。当前已提交并推送 d5dcd70:退出后不保留登录状态,调试输出改为总开关。