Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use log format similar to containerd #210

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

jsturtevant
Copy link
Contributor

Currently a shim default logs don't have time in it which can make it hard to debug timing issues:

[INFO] starting instance: f117ec9ffa52b4a5cc2550cc4ff301b645b83289f927ae4ddaeba36fd5d6aab0
[INFO] cgroup manager V2 will be used

this PR sets up the log format so that it is in same format as containerd (not including msg as that can be left to the implementor)

#example containerd log
time="2023-10-04T00:06:36.183411295Z" level=info msg="StartContainer for \"bbfbebc5259e9bc6ef12b8749e9c1760aac461db5ae506fe8c18b645c136cb4a\""

# example shim after change
time="2023-10-04T00:06:36.185484399Z" level=info instantiating instance
time="2023-10-04T00:06:36.185818899Z" level=info getting start function

Signed-off-by: James Sturtevant <jstur@microsoft.com>
@jsturtevant jsturtevant changed the title Use format similar to containerd Use log format similar to containerd Oct 4, 2023
@github-actions github-actions bot added C-shim Containerd shim T-CI Changes in project's CI labels Oct 4, 2023
@mxpv mxpv added this pull request to the merge queue Oct 4, 2023
Merged via the queue into containerd:main with commit fd734b4 Oct 4, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-shim Containerd shim T-CI Changes in project's CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants