Skip to content

Commit

Permalink
docs: add doc to describe how to use pouch run --log-driver
Browse files Browse the repository at this point in the history
Signed-off-by: Junjun Li <[email protected]>
  • Loading branch information
hellolijj committed Jan 24, 2019
1 parent 60c8bc7 commit 48290ec
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions docs/features/pouch_with_log_driver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# PouchContainer with log driver

The PouchContainer has supported the json, syslog log driver to help you retrieve log information from running containers. If you do not specify a log driver, the default is json-file.

You can view the type of log driver by following commands

```
$ pouch info | grep 'Logging Driver'
Logging Driver: json-file
```

## Configure default log drivers for pouch daemon

```
$ pouchd --log-driver syslog
INFO[0000] starting containerd module=containerd revision=773c489c9c1b21a6d78b5c538cd395416ec50f88 version=v1.0.3
INFO[0000] loading plugin "io.containerd.content.v1.content"... module=containerd type=io.containerd.content.v1
INFO[0000] loading plugin "io.containerd.snapshotter.v1.btrfs"... module=containerd type=io.containerd.snapshotter.v1
...
```

You can view the default log driver for pouch daemon by following commands

```
$ pouch info | grep 'Logging Driver'
Logging Driver: syslog
```

## Configuring log drivers for containers

```
$ pouch run --log-driver syslog registry.hub.docker.com/library/centos:7 echo "hello world"
hello world
```

You can view the default log driver for running containers by following commands

```
$ pouch inspect -f {{.HostConfig.LogConfig}} 09092c
{syslog map[]}
```

0 comments on commit 48290ec

Please sign in to comment.