feat(logcat): add export filters for debug, system, error context, and sensitive content - #1130
Open
3316891527 wants to merge 3 commits into
Open
feat(logcat): add export filters for debug, system, error context, and sensitive content#11303316891527 wants to merge 3 commits into
3316891527 wants to merge 3 commits into
Conversation
…d sensitive content Keep full AppLogger writes unchanged. Toolbox export now has five off-by-default switches that only filter the exported file. Crash report export stays full-log.
The existing string used mediestore while export code referenced mediastore.
joinToString separators were written as raw newlines and broke compilation.
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.
变更说明 / Description
工具箱「日志查看器」原先会把 AppLogger 文件原样导出。短时间对话就能得到上万行、十几 MB 的完整调试日志,里面还夹着系统提示词和请求体 dump,不利于排查,也不适合把文件发出去。
这个 PR 只改导出过滤:界面上增加五个默认关闭的开关。全关时行为和现在一样,导出完整日志;打开后导出文件会变小。写入频率、崩溃页导出都不变。
背景与动机 / Context and motivation
实测大约 12 分钟就能写出约 4 万行 / 20MB 的
operit.log。体积几乎全是D级请求体分片(Gemini / AIService),并带有完整系统提示词。现有导出没有过滤,只能整份拷走。改动范围 / Changes
log_export_preferences,下次进入页面仍保留LogcatExportHelper.exportLogs(context)无参调用仍导出全量,崩溃页继续走这条路径LogExportFilter单测和对应文案不包含:
兼容性与风险 / Compatibility and risks
operit.log关联 Issue / Related issue
N/A。没有对应 Issue。这是工具箱日志导出的过滤能力,方便把日志文件缩小后再排查或分享。
验证方式 / Verification
证据 / Evidence
检查清单 / Checklist
dev;如目标为main,我已说明这是维护者发布同步 / The target branch isdevfor regular work; if it ismain, I explained why this is a maintainer-led release syncCandidate checks覆盖改动范围,并会处理技术失败项 /Candidate checkscovers the change scope and technical failures will be addressed