Uh oh!
There was an error while loading. Please reload this page.
Document PSR-3 logging best practices - #154
Closed
samdark wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds documentation for PSR-3 logging best practices to help users produce more structured, actionable logs, and mirrors the guidance in the Russian guide.
Changes:
- Added a “Recommended logging practices” section to the main README, including guidance on exception logging via the PSR-3
exceptioncontext key. - Added equivalent recommendations to the Russian documentation guide.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Adds PSR-3-oriented logging best-practices guidance and examples. |
| docs/guide/ru/README.md | Adds Russian-language equivalent guidance to keep docs aligned across locales. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+137
to
+138
| - Логирование и создание `Throwable` требуют ресурсов. Особенно внимательно используйте их в циклах. Логгер и его цели | ||
| по умолчанию буферизуют сообщения, поэтому в долгоживущих процессах настройте интервалы сброса и экспорта. |
Comment on lines
+131
to
+134
| - Выбирайте минимально достаточный уровень. Используйте `debug` для подробной диагностики (особенно в циклах), `info` для | ||
| штатных успешных операций и редких heartbeat-сообщений, `notice` для допустимых отклонений, `warning` для сбоев, | ||
| обработанных резервным сценарием. Более высокие уровни и оповещения согласуйте в команде. Heartbeat дополняет, но не | ||
| заменяет внешнюю проверку работоспособности; при большом объёме сообщений используйте семплирование. |
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 freeto 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.
Summary
The recommendations follow the Proper logging in PHP with PSR-3 article and describe capabilities already supported by the package.
Verification