base44-troubleshooter

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Troubleshoot Production Issues

排查生产环境问题

Prerequisites

前提条件

Verify authentication before fetching logs:
bash
npx base44 whoami
If not authenticated or token expired, instruct user to run
npx base44 login
.
Must be run from the project directory (where
base44/.app.jsonc
exists):
bash
cat base44/.app.jsonc
在获取日志前先验证身份:
bash
npx base44 whoami
如果未认证或令牌已过期,请指导用户运行
npx base44 login
必须在项目目录(存在
base44/.app.jsonc
文件的目录)中运行:
bash
cat base44/.app.jsonc

Available Commands

可用命令

CommandDescriptionReference
base44 logs
Fetch function logs for this appproject-logs.md
命令描述参考文档
base44 logs
获取此应用的函数日志project-logs.md

Troubleshooting Flow

排查流程

1. Check Recent Errors

1. 检查近期错误

Start by pulling the latest errors across all functions:
bash
npx base44 logs --level error
首先拉取所有函数的最新错误:
bash
npx base44 logs --level error

2. Drill Into a Specific Function

2. 深入排查特定函数

If you know which function is failing:
bash
npx base44 logs --function <function_name> --level error
如果您知道哪个函数出现故障:
bash
npx base44 logs --function <function_name> --level error

3. Inspect a Time Range

3. 检查特定时间范围

Correlate with user-reported issue timestamps:
bash
npx base44 logs --function <function_name> --since <start_time> --until <end_time>
结合用户报告问题的时间戳:
bash
npx base44 logs --function <function_name> --since <start_time> --until <end_time>

4. Analyze the Logs

4. 分析日志

  • Look for stack traces and error messages in the output
  • Check timestamps to correlate with user-reported issues
  • Use
    --limit
    to fetch more entries if the default 50 isn't enough
  • 在输出中查找堆栈跟踪和错误信息
  • 检查时间戳以关联用户报告的问题
  • 如果默认的50条条目不够,使用
    --limit
    参数获取更多条目