Skip to content

Use log format similar to containerd#210

Merged
mxpv merged 1 commit into
containerd:mainfrom
jsturtevant:log-formatting
Oct 4, 2023
Merged

Use log format similar to containerd#210
mxpv merged 1 commit into
containerd:mainfrom
jsturtevant:log-formatting

Conversation

@jsturtevant
Copy link
Copy Markdown
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
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