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

feat: add --details flag to logs command #4009

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SpiffyEight77
Copy link
Contributor

@SpiffyEight77 SpiffyEight77 commented Mar 16, 2025

Description

Implements the --details flag for nerdctl logs to display log options(env and labels) as a prefix to each log line.

Test

json-file

nerdctl run -d --log-driver json-file --log-opt env=ENV --env ENV=foo --log-opt labels=LABEL --label LABEL=bar --log-opt max-size=5k --name json-file-details  busybox sh -c "echo baz"

nerdctl logs --details json-file-details
ENV=foo,LABEL=bar baz

journald

nerdctl run -d --log-driver journald --log-opt env=ENV --env ENV=foo --log-opt labels=LABEL --label LABEL=bar --name journald-details  busybox sh -c "echo baz"

nerdctl logs --details journald-details
ENV=foo,LABEL=bar baz

@SpiffyEight77 SpiffyEight77 force-pushed the feat/support-logs-details branch 7 times, most recently from 7e376fb to a9f9961 Compare March 19, 2025 10:18
@SpiffyEight77 SpiffyEight77 force-pushed the feat/support-logs-details branch from a9f9961 to adf61cf Compare April 5, 2025 11:30
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.

1 participant