Log format unification for easier grep
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
Enhancement
As there is no fields support in the current logger, when meeting fields like segment_id, or table_name, we are now outputting them in different ways in the log. For example, it may be like segment [1], or may be like [id:1]. This makes the grep process hard to catch all occurrences, because we need to grep for different keywords. Additionally, notice that [id:1] is not friendly for grep because it may be conflicted with other "id".
We should arrange these fields in a unified way, so that searching a specific keyword will lead and only lead to related log lines.
The following are tasks so that we can pinpoint logs related with different things:
- Related with a segment: grep by
segment_id=XX\>https://github.com/pingcap/tiflash/pull/5728 - Related with segment changes: grep by
Split,MergeDelta,Merge,Flushhttps://github.com/pingcap/tiflash/pull/5728 - Related with a table: grep by
table_id=XX\>https://github.com/pingcap/tiflash/pull/6055 - Related with a DMFile: TBD
- Related with a stable layer: TBD
- Related with a delta layer: TBD
- Related with a dm store: TBD
- Related with a region: TBD
Contributor guide
No contributing guide indexed for this repository
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 existing logging changes in pull requests #5728 and #6055, then identify how the unchecked DMFile, stable layer, delta layer, dm store, and region log fields are currently emitted. Done means defining and applying a consistent grep-friendly format for the remaining areas, with the relevant log lines searchable by their specific fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100