vllm-project / vllm-project/aibrix

Build better logging experiences with zap/klogr and structure logging

Open
#262 4 comments 0 reactions 1 assignee Claimed by @nadongjun View on GitHub
good first issue help wanted kind/enhancement kind/misc priority/important-soon
Dominant language
Go
Stars
5.1k
Forks
694
Avg merge
1d 20h
Merged PRs (30d)
98

Description

### 🚀 Feature Description and Motivation

- Option 1: zap (native solution), good for structure logging

- Option 2: klogr + klog - most simplest solution with minimum changes

no need to change the klog reference in the controller codes, append `--v=4` will show the debug level messages.

```
klog.InitFlags(flag.CommandLine)
defer klog.Flush()
flag.Parse()

ctrl.SetLogger(klogr.New())
```

- Option 3: klogr textlogger
```
logConfig := textlogger.NewConfig(
textlogger.Verbosity(4),
textlogger.Output(os.Stdout))
ctrl.SetLogger(textlogger.NewLogger(logConfig))
```

in this case, `textlogger.Verbosity(4)` won't show klog.V(4), there're still separate. We should use `ctrl.Log.V(4).Info`

### Use Case

_No response_

### Proposed Solution

_No response_

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.