|
@@ -137,11 +137,9 @@ func (daemon *Daemon) ContainerExecCreate(name string, config *types.ExecConfig)
|
|
|
}
|
|
|
|
|
|
daemon.registerExecCommand(cntr, execConfig)
|
|
|
-
|
|
|
- attributes := map[string]string{
|
|
|
+ daemon.LogContainerEventWithAttributes(cntr, "exec_create: "+execConfig.Entrypoint+" "+strings.Join(execConfig.Args, " "), map[string]string{
|
|
|
"execID": execConfig.ID,
|
|
|
- }
|
|
|
- daemon.LogContainerEventWithAttributes(cntr, "exec_create: "+execConfig.Entrypoint+" "+strings.Join(execConfig.Args, " "), attributes)
|
|
|
+ })
|
|
|
|
|
|
return execConfig.ID, nil
|
|
|
}
|
|
@@ -175,10 +173,9 @@ func (daemon *Daemon) ContainerExecStart(ctx context.Context, name string, optio
|
|
|
ec.Unlock()
|
|
|
|
|
|
log.G(ctx).Debugf("starting exec command %s in container %s", ec.ID, ec.Container.ID)
|
|
|
- attributes := map[string]string{
|
|
|
+ daemon.LogContainerEventWithAttributes(ec.Container, "exec_start: "+ec.Entrypoint+" "+strings.Join(ec.Args, " "), map[string]string{
|
|
|
"execID": ec.ID,
|
|
|
- }
|
|
|
- daemon.LogContainerEventWithAttributes(ec.Container, "exec_start: "+ec.Entrypoint+" "+strings.Join(ec.Args, " "), attributes)
|
|
|
+ })
|
|
|
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
@@ -311,10 +308,9 @@ func (daemon *Daemon) ContainerExecStart(ctx context.Context, name string, optio
|
|
|
if _, ok := err.(term.EscapeError); !ok {
|
|
|
return errdefs.System(errors.Wrap(err, "exec attach failed"))
|
|
|
}
|
|
|
- attributes := map[string]string{
|
|
|
+ daemon.LogContainerEventWithAttributes(ec.Container, "exec_detach", map[string]string{
|
|
|
"execID": ec.ID,
|
|
|
- }
|
|
|
- daemon.LogContainerEventWithAttributes(ec.Container, "exec_detach", attributes)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
return nil
|