diff --git a/api/config.go b/api/config.go index 7b8c963..4f32ba1 100644 --- a/api/config.go +++ b/api/config.go @@ -9,7 +9,7 @@ import ( func parseConfig() error { binPath, err := filepath.Abs(filepath.Dir(os.Args[0])) if err != nil { - logger.Fatalf("cannot load binary path: %v", err) + logger.Errorf("cannot load binary path: %v", err) return err } @@ -43,7 +43,7 @@ func parseConfig() error { // Mandatory config parameters for _, env := range []string{"POSTGRES", "PORT", "ORIGIN"} { if os.Getenv(env) == "" { - logger.Fatalf("missing %s environment variable", env) + logger.Errorf("missing %s environment variable", env) return errorMissingConfig } } diff --git a/api/smtp_templates.go b/api/smtp_templates.go index 1f42f15..add8522 100644 --- a/api/smtp_templates.go +++ b/api/smtp_templates.go @@ -27,7 +27,7 @@ Subject: {{.Subject}} `) if err != nil { - logger.Fatalf("cannot parse header template: %v", err) + logger.Errorf("cannot parse header template: %v", err) return errorMalformedTemplate } @@ -41,7 +41,7 @@ Subject: {{.Subject}} templates[name] = template.New(name) templates[name], err = template.ParseFiles(fmt.Sprintf("%s/templates/%s.html", os.Getenv("COMMENTO_STATIC"), name)) if err != nil { - logger.Fatalf("cannot parse %s/templates/%s.html: %v", os.Getenv("STATIC"), name, err) + logger.Errorf("cannot parse %s/templates/%s.html: %v", os.Getenv("STATIC"), name, err) return errorMalformedTemplate } }