fix bad log formatting

This commit is contained in:
Lilian Jónsdóttir 2024-01-22 21:54:33 -08:00
parent f3f3f4406c
commit 4f97975986

View file

@ -104,11 +104,11 @@ func RenderTemplate(w http.ResponseWriter, t string, data *models.TemplateData)
err := template.Template.Execute(buf, data)
if err != nil {
app.Logger.Fatal("Error executing template %s! Goodbye!", "err", err)
app.Logger.Fatal(fmt.Sprintf("Error executing template %s! Goodbye!", filename), "err", err)
}
_, err = buf.WriteTo(w)
if err != nil {
app.Logger.Error("Error writing template %s!\n", "err", err)
app.Logger.Error(fmt.Sprintf("Error writing template %s!", filename), "err", err)
}
}