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
+5 -1
View File
@@ -17,7 +17,11 @@ func Health(cfg *config.Config) *cli.Command {
Usage: "check health status",
Category: "info",
Before: func(c *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 {
logger := logging.Configure(cfg.Service.Name, cfg.Log)
+5 -1
View File
@@ -23,7 +23,11 @@ func Server(cfg *config.Config) *cli.Command {
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *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 {
logger := logging.Configure(cfg.Service.Name, cfg.Log)