mirror of
https://github.com/containers/podman.git
synced 2025-08-23 17:22:30 +08:00
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>
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user