tech(cli): rename log to logger to separate from server logger

This commit is contained in:
bergquist
2016-06-03 12:19:04 +02:00
parent 4c4189d631
commit 15aeb4aec2
9 changed files with 29 additions and 27 deletions

View File

@ -5,7 +5,7 @@ import (
"github.com/codegangsta/cli"
"github.com/fatih/color"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/log"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
)
func runCommand(command func(commandLine CommandLine) error) func(context *cli.Context) {
@ -13,13 +13,13 @@ func runCommand(command func(commandLine CommandLine) error) func(context *cli.C
cmd := &contextCommandLine{context}
if err := command(cmd); err != nil {
log.Errorf("\n%s: ", color.RedString("Error"))
log.Errorf("%s\n\n", err)
logger.Errorf("\n%s: ", color.RedString("Error"))
logger.Errorf("%s\n\n", err)
cmd.ShowHelp()
os.Exit(1)
} else {
log.Info("\nRestart grafana after installing plugins . <service grafana-server restart>\n\n")
logger.Info("\nRestart grafana after installing plugins . <service grafana-server restart>\n\n")
}
}
}