summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-05-29 17:51:27 +0200
committerGitHub <noreply@github.com>2019-05-29 17:51:27 +0200
commit294448c2ea880ec550548537b0681a0e30e161d7 (patch)
treebf19af8e02cc57a422174cd9e3e6e24e221eac59 /libpod/container.go
parentc9357f07cea6a62e59714200073541711aa3b55c (diff)
parent88429242ddf82c03509ca66a687d9fb1534d2446 (diff)
downloadpodman-294448c2ea880ec550548537b0681a0e30e161d7.tar.gz
podman-294448c2ea880ec550548537b0681a0e30e161d7.tar.bz2
podman-294448c2ea880ec550548537b0681a0e30e161d7.zip
Merge pull request #2709 from haircommander/journald
Add libpod journald logging
Diffstat (limited to 'libpod/container.go')
-rw-r--r--libpod/container.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/libpod/container.go b/libpod/container.go
index c07f4c78d..c8ab42fc3 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -51,6 +51,15 @@ const CgroupfsDefaultCgroupParent = "/libpod_parent"
// manager in libpod
const SystemdDefaultCgroupParent = "machine.slice"
+// JournaldLogging is the string conmon expects to specify journald logging
+const JournaldLogging = "journald"
+
+// KubernetesLogging is the string conmon expects when specifying to use the kubernetes logging format
+const KubernetesLogging = "k8s-file"
+
+// JSONLogging is the string conmon expects when specifying to use the json logging format
+const JSONLogging = "json-file"
+
// DefaultWaitInterval is the default interval between container status checks
// while waiting.
const DefaultWaitInterval = 250 * time.Millisecond
@@ -368,6 +377,8 @@ type ContainerConfig struct {
CgroupParent string `json:"cgroupParent"`
// LogPath log location
LogPath string `json:"logPath"`
+ // LogDriver driver for logs
+ LogDriver string `json:"logDriver"`
// File containing the conmon PID
ConmonPidFile string `json:"conmonPidFile,omitempty"`
// RestartPolicy indicates what action the container will take upon
@@ -775,6 +786,11 @@ func (c *Container) RestartRetries() uint {
return c.config.RestartRetries
}
+// LogDriver returns the log driver for this container
+func (c *Container) LogDriver() string {
+ return c.config.LogDriver
+}
+
// RuntimeName returns the name of the runtime
func (c *Container) RuntimeName() string {
return c.runtime.ociRuntime.name