Document array messages in the Logger

未关闭
#155 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
php
领域
documentation

调研方向

Read the listed Logger and debugger pages, then check the released 3.2.0 code for the signatures and adapter behavior. Update the named pages and upgrade guide, keeping each fact on its home page and linking to it elsewhere. Verify examples against released code and check that internal links and anchors resolve.

由索引模型根据 Issue 内容生成。

描述

documentation

Summary

Make the Logger pages match the behavior of quantum-php/framework#613, which lets logger() log an array message. It is in the 3.2.0 milestone because it changes the ReportableInterface contract.

Why

The Logger pages already promise that an array message is JSON-encoded with pretty printing, and that logger() is for structured array messages. In 3.1.x that call throws a TypeError. When #613 ships in 3.2.0, ReportableInterface::report() and the Logger methods accept string|Stringable|array, and each adapter renders the message, so the pages have to describe what really happens in each adapter and in the debugbar. A custom adapter has to widen its report() signature, which is a breaking change.

Pages

  • v3.0/packages/logger/usage.md: the "Log a structured payload" example, checked against the released code.
  • v3.0/packages/logger/contracts.md: the new signature of ReportableInterface::report().
  • v3.0/packages/logger/adapters.md and architecture.md: how each adapter writes an array message, and what the debug-mode adapter keeps for the debugbar.
  • v3.0/packages/logger/helpers.md: the signatures of error(), warning(), notice(), info() and debug(), which accept an array message too, and the two sentences that say the helpers take string messages only.
  • v3.0/packages/debugger/architecture.md: how an array message appears in the messages tab, which is fed by logger()->getAdapter()->getMessages().
  • v3.0/upgrade-guide.md: a note for applications with a custom logger adapter, which must accept string|Stringable|array, and for applications that subclass Logger and override a level method.

Acceptance criteria

  • every name and example exists in the released code and was run
  • each fact is stated once at its home page and linked elsewhere
  • internal links and anchors resolve
  • the pull request goes into staging and is published with the 3.2.0 documentation release
主要语言
没有语言数据
星标
3
派生
1
平均合并
2 分钟
30 天内合并 PR
26

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

quantum-php/docs 的其他 Issue

查看 quantum-php/docs 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。