refactor: use a common logger for consistency

All kapow messages will end up in stderr (incl. debug mode).
stdout is reserved for the access logs.

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
This commit is contained in:
pancho horrillo
2020-12-16 17:29:26 +01:00
parent d62a9dba68
commit 41be4f9344
11 changed files with 60 additions and 53 deletions
+2 -2
View File
@@ -17,12 +17,12 @@
package cmd
import (
"log"
"os"
"github.com/spf13/cobra"
"github.com/BBVA/kapow/internal/client"
"github.com/BBVA/kapow/internal/logger"
)
// GetCmd is the command line interface for get kapow data operation
@@ -38,7 +38,7 @@ var GetCmd = &cobra.Command{
err := client.GetData(dataURL, handler, args[0], os.Stdout)
if err != nil {
log.Fatal(err)
logger.L.Fatal(err)
}
},
}