code: func (daemon *Daemon) LogContainerEventWithAttributes(container *container.Container, action string, attributes map[string]string) {
  	copyAttributes(attributes, container.Config.Labels)
  	if container.Config.Image != "" {
  		attributes["image"] = container.Config.Image
  	}
  	attributes["name"] = strings.TrimLeft(container.Name, "/")
  
  	actor := events.Actor{
  		ID:         container.ID,
  		Attributes: attributes,
  	}
  	daemon.EventsService.Log(action, events.ContainerEventType, actor)
  }
docs: // LogContainerEventWithAttributes generates an event related to a container with specific given attributes.