Make log format more customizable
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- php
- Domain
- observability
Research direction
Start with src/Message/Formatter.php at the referenced conversion and context-formatting locations. Read how values, trace output, common context, and message context are currently assembled. Done means callers can provide a value-to-string callable and change the context template and ordering without breaking the PSR-3 logger behavior.
Written by the indexing model from the issue text.
Description
- Allow to set own callable for convert value to string (https://github.com/yiisoft/log/blob/master/src/Message/Formatter.php#L257)
- Add template (and allow user to change it) for context (https://github.com/yiisoft/log/blob/e0551896a54a91dd3c15d415167d0402c7bf9aaf/src/Message/Formatter.php#L196C22-L196C32). It should be possible to change the order of output trace, common context, message context.
- Dominant language
- PHP
- Stars
- 43
- Forks
- 24
- Avg merge
- 55m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yiisoft/log
-
status:under discussion
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
severity:BC breaking
Difficulty 3/5 1-2 days Newbie friendliness 50/100
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·