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

Spoof json-file logging support #3375

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libpod/oci_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res
}

logDriver := KubernetesLogging
if ctr.LogDriver() != "" {
if ctr.LogDriver() == JSONLogging {
logrus.Errorf("json-file logging specified but not supported. Choosing k8s-file logging instead")
Copy link
Member

Choose a reason for hiding this comment

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

This should be a Warnf not an Errorf.

Copy link
Member

Choose a reason for hiding this comment

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

I really want to keep the Errrof here - we need to make it very obvious that they should switch to k8s-file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I would be fine either way, I'll let you two decide. I will weigh in that the only reason a user cares about the difference is if they want to read the log as a json. If we leave it as a warning, and document it, we can point users to the fact they can't read it as json, and thus not have a loud error.

} else if ctr.LogDriver() != "" {
logDriver = ctr.LogDriver()
}
args = append(args, "-l", fmt.Sprintf("%s:%s", logDriver, ctr.LogPath()))
Expand Down