log parsing errors to stdout

This commit is contained in:
Willy Kloucek
2022-04-28 15:52:26 +02:00
parent 5a6c44afa0
commit 83b94cf82d
60 changed files with 346 additions and 61 deletions
+6 -1
View File
@@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"os"
"path"
@@ -32,7 +33,11 @@ func Gateway(cfg *config.Config) *cli.Command {
Name: "gateway",
Usage: "start gateway",
Before: func(ctx *cli.Context) error {
return parser.ParseConfig(cfg)
err := parser.ParseConfig(cfg)
if err != nil {
fmt.Printf("%v", err)
}
return err
},
Action: func(c *cli.Context) error {
logCfg := cfg.Logging