debug: 添加调试日志,输出到外置存储#25
Closed
sisterfuture wants to merge 6 commits into
Closed
Conversation
新增功能: 1. getDebugLogFilePath() - 获取调试日志路径(包含包名,避免多应用冲突) 格式: /sdcard/Download/builtinftp_<包名>_debug.log 2. writeDebugLog() - 写入调试日志到外置存储 3. logFtpCommand() - 记录所有 FTP 命令 4. logFtpReply() - 记录所有 FTP 响应 5. processStorCommand() 中改进 150 响应消息,便于调试 调试信息包括: - FTP 命令接收 - FTP 响应发送(特别是 STOR 命令的 150 响应) - 文件上传进度 - 错误信息 注意:日志文件路径包含包名,如: - 太极FTP应用: builtinftp_com.stupidbeauty.hxftpserver_debug.log - 未来姐姐: builtinftp_com.stupidbeauty.sisterfuture_debug.log 这样可以避免多应用日志冲突。
仅在以下位置添加调试日志: 1. processStorCommand() - 记录 STOR 命令处理 2. processCommand() - 记录所有命令 3. receiveDataSocket() - 记录数据接收 4. handleDataAccept() - 记录数据连接 5. finishFileWrite() - 记录文件关闭 日志路径包含包名避免多应用冲突: /sdcard/Download/builtinftp_<包名>_debug.log
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.
调试目的
解决未来姐姐
ftpFileWrite工具向太极 FTP 服务器上传文件失败的问题。错误信息:
Truncated server reply: '150 '(MalformedServerReplyException)新增调试功能
/sdcard/Download/builtinftp_<包名>_debug.logbuiltinftp_com.stupidbeauty.hxftpserver_debug.loglogFtpCommand()和logFtpReply()调试步骤
待解决