Rename "log_event" to "log"

Signed-off-by: Solomon Hykes <solomon@docker.com>
This commit is contained in:
Solomon Hykes 2014-08-06 09:28:30 +00:00
parent 8d056423f8
commit 1c11d7f93e
4 changed files with 5 additions and 5 deletions

View file

@ -170,7 +170,7 @@ func (container *Container) WriteHostConfig() error {
func (container *Container) LogEvent(action string) {
d := container.daemon
if err := d.eng.Job("log_event", action, container.ID, d.Repositories().ImageName(container.Image)).Run(); err != nil {
if err := d.eng.Job("log", action, container.ID, d.Repositories().ImageName(container.Image)).Run(); err != nil {
utils.Errorf("Error running container: %s", err)
}
}

View file

@ -93,7 +93,7 @@ func (daemon *Daemon) DeleteImage(eng *engine.Engine, name string, imgs *engine.
out := &engine.Env{}
out.Set("Untagged", repoName+":"+tag)
imgs.Add(out)
eng.Job("log_event", "untag", img.ID, "").Run()
eng.Job("log", "untag", img.ID, "").Run()
}
}
tags = daemon.Repositories().ByID()[img.ID]
@ -111,7 +111,7 @@ func (daemon *Daemon) DeleteImage(eng *engine.Engine, name string, imgs *engine.
out := &engine.Env{}
out.Set("Deleted", img.ID)
imgs.Add(out)
eng.Job("log_event", "delete", img.ID, "").Run()
eng.Job("log", "delete", img.ID, "").Run()
if img.Parent != "" && !noprune {
err := daemon.DeleteImage(eng, img.Parent, imgs, false, force, noprune)
if first {

View file

@ -30,7 +30,7 @@ func (e *Events) Install(eng *engine.Engine) error {
// Here you should describe public interface
jobs := map[string]engine.Handler{
"events": e.Get,
"log_event": e.Log,
"log": e.Log,
"subscribers_count": e.SubscribersCount,
}
for name, job := range jobs {

View file

@ -88,7 +88,7 @@ func TestLogEvents(t *testing.T) {
action := fmt.Sprintf("action_%d", i)
id := fmt.Sprintf("cont_%d", i)
from := fmt.Sprintf("image_%d", i)
job := eng.Job("log_event", action, id, from)
job := eng.Job("log", action, id, from)
if err := job.Run(); err != nil {
t.Fatal(err)
}