pingcap / pingcap/tidb

Add logging support for better observability

Open
#69,162 1 comment 0 reactions 0 assignees View on GitHub
contribution first-time-contributor
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

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.