diff --git a/main.go b/main.go index 9637c774202f..cbf27e6d1965 100644 --- a/main.go +++ b/main.go @@ -9,8 +9,15 @@ import ( "strings" "text/tabwriter" + // These packages have init() funcs which check os.Args and drop directly + // into their command logic. This is because they are run as seperate + // processes along side of a task. By early importing them we can avoid + // additional code being imported and thus reserving memory + _ "github.com/hashicorp/nomad/client/logmon" + _ "github.com/hashicorp/nomad/drivers/docker/docklog" + _ "github.com/hashicorp/nomad/drivers/shared/executor" + "github.com/hashicorp/nomad/command" - "github.com/hashicorp/nomad/drivers/docker/docklog" "github.com/hashicorp/nomad/version" "github.com/mattn/go-colorable" "github.com/mitchellh/cli" @@ -38,7 +45,7 @@ var ( "server-join", "server-members", "syslog", - docklog.PluginName, + "docker_logger", } // aliases is the list of aliases we want users to be aware of. We hide