pingcap / pingcap/tidb

Add logging support for better observability

Open
#69,504 0 comments 0 reactions 0 assignees View on GitHub
contribution
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Feature Request

### Summary
The project would benefit from structured logging to make it easier to debug issues in production.

### Motivation
Currently it can be difficult to understand what the application is doing at runtime without adding print statements. Proper logging would:

- Allow users to control verbosity with log levels (DEBUG, INFO, WARNING, ERROR)
- Make it easier to integrate with log aggregation systems
- Help diagnose issues in production without code changes

### Proposed Implementation
```python
import logging

log = logging.getLogger(__name__)

def my_function():
log.debug("Starting my_function")
# ...
log.info("my_function completed successfully")
```

### Impact
Low risk change with high value for users running this in production environments.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or Go entry points. Start by locating the project's runtime logging entry points and reviewing how production diagnostics are currently emitted. Done should include structured logs, controllable DEBUG/INFO/WARNING/ERROR levels, and compatibility with log aggregation systems.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.