diff options
author | baude <bbaude@redhat.com> | 2019-02-28 14:15:56 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-03-11 15:08:59 -0500 |
commit | ca1e76ff632dec0b0e00e25f26677887ca8cc625 (patch) | |
tree | bf5c231a826f4ce15d52a6d4e52e0b11abeb85f0 /libpod/container_commit.go | |
parent | 6421208e0f6ff1fba58eafdab12e897b5ed12e3b (diff) | |
download | podman-ca1e76ff632dec0b0e00e25f26677887ca8cc625.tar.gz podman-ca1e76ff632dec0b0e00e25f26677887ca8cc625.tar.bz2 podman-ca1e76ff632dec0b0e00e25f26677887ca8cc625.zip |
Add event logging to libpod, even display to podman
In lipod, we now log major events that occurr. These events
can be displayed using the `podman events` command. Each
event contains:
* Type (container, image, volume, pod...)
* Status (create, rm, stop, kill, ....)
* Timestamp in RFC3339Nano format
* Name (if applicable)
* Image (if applicable)
The format of the event and the varlink endpoint are to not
be considered stable until cockpit has done its enablement.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/container_commit.go')
-rw-r--r-- | libpod/container_commit.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/container_commit.go b/libpod/container_commit.go index 5c4fd1a31..0604a550b 100644 --- a/libpod/container_commit.go +++ b/libpod/container_commit.go @@ -8,6 +8,7 @@ import ( "github.com/containers/buildah" "github.com/containers/buildah/util" is "github.com/containers/image/storage" + "github.com/containers/libpod/libpod/events" "github.com/containers/libpod/libpod/image" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -177,5 +178,6 @@ func (c *Container) Commit(ctx context.Context, destImage string, options Contai if err != nil { return nil, err } + defer c.newContainerEvent(events.Commit) return c.runtime.imageRuntime.NewFromLocal(id) } |