Skip to content

日志文件

本页用于在排查或反馈问题时快速定位日志和 artifact。它只列路径、格式和关键词;具体问题的判断步骤见 问题排查

Jugg 的主日志位于项目目录下的 build/jugg/log/。排查编译、部署、Debug、MCP 和运行时问题时,通常先看 compile_latest.log

日志路径

路径说明
build/jugg/log/compile_latest.log当前主日志的 best-effort 快捷入口。
build/jugg/log/compile_latest-1.log上一份主日志的 best-effort 快捷入口。
build/jugg/log/compile_YYYY-MM-DD_HH-mm-ss.0.log实际滚动日志文件。
build/jugg/mcp_fetch/<toolName>/MCP 拉取类工具生成的 artifact。
build/jugg/tmp/diff/远端编译 diff 结果。
Android Studio idea.logAndroid Studio 自身日志,用于 Debug attach、IDE freeze、插件加载等问题。

compile_latest.log 是快捷入口,不是唯一真实文件。如果文件看起来没有更新,同时检查滚动日志和 compile_latest-1.log

日志格式

text
[2026-03-16 16:13:27.109] [INFO   ] [ClassName] message
字段说明
时间戳精确到毫秒。
级别FINEINFOWARNINGSEVERE 等运行时级别。
ClassName日志来源标签,通常可作为源码定位入口。
message具体事件、耗时、错误或状态说明。

常用检索词

目标关键词
编译开始Jugg compile started
增量/全量判断preprocessIncrementalCompile
无文件变化回退No file changesconfirmFallbackWhenNoFileChanges
回退原因fallbackFallback
编译失败incremental compile errorSEVERE
APK DB 初始化initAfterInstall parsed apk startdatabase all init finish
部署开始deploy start
部署恢复 / 重试recoverretry
Debug attachJugg Debug attach:waitForClientReadyForDebugConnected to the target VM
Const-refConstRefEnginefull scan progress
UI freezeuiFreezeStartedInvocationEvent has timed out
MCP 日志等待wait-logsmarkercrash

MCP 日志结果

wait-logs 会等待日志 marker、crash 或 timeout,并返回:

字段说明
stopReasonmarkercrashtimeout
startTime / endTimelogcat threadtime 格式时间。
targetPids停止时枚举到的目标进程 PID。
logs过滤后的日志窗口,最多 100 行。
allLogsPath全量原始日志落盘路径。
truncated返回日志是否被截断。

layout-dumpactivity-stack 等工具返回文件路径时,会放在 artifactsdata 中,路径位于 build/jugg/mcp_fetch/

排查建议

  1. 先定位用户操作或错误发生的准确时间。
  2. compile_latest.log 中向前后扩展阅读同一时间窗。
  3. [ClassName] 标签定位相关模块。
  4. Debug attach、IDE freeze、插件启动问题需要同时看 Android Studio idea.log
  5. 远端编译问题需要同时看 full log 和 build/jugg/tmp/diff/

相关页面