Skip to content

debug: 添加调试日志,输出到外置存储#10

Closed
sisterfuture wants to merge 1 commit into
masterfrom
debug/ftp-upload-issue
Closed

debug: 添加调试日志,输出到外置存储#10
sisterfuture wants to merge 1 commit into
masterfrom
debug/ftp-upload-issue

Conversation

@sisterfuture

Copy link
Copy Markdown
Owner

调试目的

解决未来姐姐 ftpFileWrite 工具向太极 FTP 服务器上传文件失败的问题。

错误信息: Truncated server reply: '150 ' (MalformedServerReplyException)

新增调试功能

  1. 外置存储日志 - 写入到 /sdcard/Download/builtinftp_debug.log,便于通过未来姐姐直接读取
  2. FTP 命令/响应记录 - logFtpCommand()logFtpReply()
  3. STOR 命令 150 响应改进 - 包含文件名,便于定位问题

调试步骤

  1. 构建此版本 APK
  2. 在小米手机上安装并启动 FTP 服务器
  3. 使用未来姐姐 ftpFileWrite 工具上传文件(应失败)
  4. 读取 /sdcard/Download/builtinftp_debug.log 分析失败原因

待解决

  • 需要确认服务器发送的 150 响应格式是否被客户端正确解析

新增功能:
1. writeDebugLog() - 写入调试日志到 /sdcard/Download/builtinftp_debug.log
2. logFtpCommand() - 记录所有 FTP 命令
3. logFtpReply() - 记录所有 FTP 响应
4. processStorCommand() 中改进 150 响应消息,便于调试

调试信息包括:
- FTP 命令接收
- FTP 响应发送(特别是 STOR 命令的 150 响应)
- 文件上传进度
- 错误信息
@hxcan hxcan closed this May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants