Utility to consolidate log messages of form f"X={X}"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 150
- Forks
- 23
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 2
Description
Particularly in the field module, but also frequently elsewhere throughout the modules in the codebase, we have logging or error messages (often for debugging but not always) which name a variable and then print it's value, for example across these blocks from field (though not always contiguously so as to be condensable into one statement):
These aren't necessarily troublesome and not usually user-facing (unless the user is hardcore and debugging), but to add flexibility of pretty-printed output (indentation, etc., even allowing for support of a machine-parsable output which can be queried rather than eyeballed for serious debugging) and reduce duplication it might be good to create a method that manages the logic of printing the name and value (and perhaps registering in some structure for such easy querying).
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.
Research direction
Start by reviewing the referenced logging blocks in cf/field.py around lines 480–483 and 1724–1735, then search the modules for similar messages. Clarify whether the utility should only consolidate name/value output or also support pretty-printed and machine-queryable records. Done requires an agreed scope and tests covering the chosen output behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100