mirror of
https://github.com/containers/podman.git
synced 2025-05-20 08:36:23 +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:
@ -12,6 +12,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/containers/libpod/libpod/events"
|
||||
"github.com/containers/libpod/pkg/ctime"
|
||||
"github.com/containers/libpod/pkg/hooks"
|
||||
"github.com/containers/libpod/pkg/hooks/exec"
|
||||
@ -824,7 +825,7 @@ func (c *Container) init(ctx context.Context) error {
|
||||
if err := c.save(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer c.newContainerEvent(events.Init)
|
||||
return c.completeNetworkSetup()
|
||||
}
|
||||
|
||||
@ -1022,7 +1023,6 @@ func (c *Container) restartWithTimeout(ctx context.Context, timeout uint) (err e
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return c.start()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user