Skip to content

log/logtest: add testcase as debug field#8025

Merged
estesp merged 1 commit intocontainerd:mainfrom
fuweid:enhance-testlog
Jan 30, 2023
Merged

log/logtest: add testcase as debug field#8025
estesp merged 1 commit intocontainerd:mainfrom
fuweid:enhance-testlog

Conversation

@fuweid
Copy link
Copy Markdown
Member

@fuweid fuweid commented Jan 29, 2023

It is hard to tell where the log_hook log comes from, when we run test parallelly. Add test name as field as debug purpose.

log_hook.go:47: time="2023-01-29T13:09:37.687070239+08:00" level=debug msg=fetch func=remotes.Fetch file="/home/fuwei/go/src/github.com/containerd/containerd/remotes/handlers.go:114" digest="sha256:ea362f368469f909a95f9a6e54ebe0121ce0a8e3c30583dd9c5fb35b14544dec" mediatype=application/vnd.docker.image.rootfs.diff.tar.gzip size=28566425 testcase=TestCRIImagePullTimeout/NoDataTransferred

REF: #8024

Signed-off-by: Wei Fu [email protected]

It is hard to tell where the `log_hook` log comes from, when we run test
parallelly. Add test name as field as debug purpose.

```
log_hook.go:47: time="2023-01-29T13:09:37.687070239+08:00" level=debug msg=fetch func=remotes.Fetch file="/home/fuwei/go/src/github.com/containerd/containerd/remotes/handlers.go:114" digest="sha256:ea362f368469f909a95f9a6e54ebe0121ce0a8e3c30583dd9c5fb35b14544dec" mediatype=application/vnd.docker.image.rootfs.diff.tar.gzip size=28566425 testcase=TestCRIImagePullTimeout/NoDataTransferred
```

REF: containerd#8024

Signed-off-by: Wei Fu <[email protected]>
Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@estesp estesp merged commit 0b81378 into containerd:main Jan 30, 2023
@fuweid fuweid deleted the enhance-testlog branch January 30, 2023 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants