Utility to consolidate log messages of form f"X={X}"
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 150
- Forks
- 23
- Ø Merge
- 1 T. 11 Std.
- Gemergte PRs (30 T.)
- 2
Beschreibung
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).
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die referenzierten Logging-Blöcke in cf/field.py um die Zeilen 480–483 und 1724–1735 zu prüfen, und suche anschließend in den Modulen nach ähnlichen Meldungen. Kläre, ob das Dienstprogramm nur die Ausgabe von Name/Wert konsolidieren oder auch hübsch formatierte und maschinenabfragbare Datensätze unterstützen soll. Als erledigt gilt die Aufgabe, wenn ein abgestimmter Umfang und Tests vorliegen, die das ausgewählte Ausgabeverhalten abdecken.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- observability-sre
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100