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

Add IMAGE_NAME attribute to journald log events #38032

Merged
merged 1 commit into from
Oct 17, 2018

Conversation

RohitK89
Copy link

Signed-off-by: Rohit Kapur rkapur@flatiron.com
Closes #21497

- What I did
Adds a new key - IMAGE_NAME - that contains the image:tag value to journald log messages. Note that this makes use of Info.ImageName() to retrieve the value, which doesn't return the tag if its value is latest.

- How I did it
Updated the journald logging driver

- How to verify it

docker run -it --log-driver=journald ubuntu echo "Hello world"
journalctl -t ubuntu -o json --all

The journald entry returned should have IMAGE_NAME as one of the keys

- Description for the changelog
Add IMAGE_NAME attribute to journald log event

- A picture of a cute animal (not mandatory but encouraged)
cat

Signed-off-by: Rohit Kapur <rkapur@flatiron.com>
Copy link
Member

@yongtang yongtang left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Oct 13, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@10ebe63). Click here to learn what that means.
The diff coverage is 0%.

@@            Coverage Diff            @@
##             master   #38032   +/-   ##
=========================================
  Coverage          ?   36.11%           
=========================================
  Files             ?      610           
  Lines             ?    45187           
  Branches          ?        0           
=========================================
  Hits              ?    16319           
  Misses            ?    26630           
  Partials          ?     2238

@RohitK89
Copy link
Author

Related documentation PR here

Copy link
Member

@fntlnz fntlnz left a comment

Choose a reason for hiding this comment

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

LGTM

@RohitK89
Copy link
Author

@fntinz @yongtang Do I need to do anything to fix the codecov/patch check? Apologies if this is a stupid question.

@yongtang
Copy link
Member

@RohitK89 The codecov/patch is not needed.

@RohitK89
Copy link
Author

Hey folks. Just to confirm, there's nothing else needed from me to move this forward, right? Again, apologies if this is a stupid question. The docs recommend having the documentation change in the same commit, but given that it's a different project, I linked to the relevant PR here. Is that sufficient?

@yongtang
Copy link
Member

Looks like we have two LGTMs and all tests passed. codecov/patch is unrelated.

@yongtang yongtang merged commit 533e07a into moby:master Oct 17, 2018
@RohitK89 RohitK89 deleted the 21497-log-image-name branch October 30, 2018 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants