Repository navigation
feat(logging): 接入结构化日志 v2 插件操作事实(由宿主代记) - #3
Merged
Merged
Conversation
- README 新增“诊断日志”一节:说明宿主记录到哪个通道、哪些输出留在控制台、 排障时用什么入口,以及哪些内容不应写入日志 - 注明 Windows 仍为 v1 日志,未声明 Windows v2 验收
This was referenced Nov 4, 2026
xiaoyumuxi
marked this pull request as ready for review
November 4, 2026 10:58
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.
概要
PHP 插件接入结构化日志 v2 的插件操作事实。本插件是纯声明式插件(
languageServers声明 Intelephense 的--stdio启动),没有自己的进程,无法像 SDK 插件那样发送lithe/log。宿主 1lck/Lithe-IDEA#1720 因此替它记录:languageServer/start(Intelephense 每次启动尝试)写成与 SDK 插件同一组的plugins.operation.finished/plugins.operation.failed,落到plugins/io.github.lithe-idea.php-support/host通道。插件清单、启动方式和版本都不需要改;本 PR 在 README 里说明插件会得到哪些事实和失败码。
插件会得到的操作事实
plugins/io.github.lithe-idea.php-support/host,与 SDK 插件的lithe/log同一类通道,日志窗口可按插件筛选。languageServer/start(Intelephense 每次启动尝试)。plugins.operation.finished(INFO,含耗时),条件是 Intelephense 的initialize成功。plugins.operation.failed(ERROR),失败码只取自执行阶段,不解析错误文本:host.executableUnavailable:无法解析启动命令host.launchFailed:进程拉起失败host.initializeFailed:初始化握手失败host.exitedEarly:就绪前退出host.timedOut:初始化超时README 新增“诊断日志”
window/logMessage和有界 stderr 写入当前会话的lsp/php通道。--stdio启动方式,脱敏、截断、写入和保留都由宿主统一处理,插件不创建自己的日志 writer。验证
plugin_operations映射表与相关 macOS 回归)。node scripts/package.mjs,交给 CI。预期的 CI 状态与合并顺序
preview之后再合并,避免 README 描述的行为先于宿主出现。限制
配套 PR: