Skip logging default pad template fallback

This reduces unnecessary logging by not showing the "no template" line
when the `editor` config value is empty (default).
pull/210/head
Matt Baer 5 years ago
parent bca678aee5
commit 80362000fe
  1. 4
      pad.go

@ -61,7 +61,9 @@ func handleViewPad(app *App, w http.ResponseWriter, r *http.Request) error {
padTmpl := app.cfg.App.Editor
if templates[padTmpl] == nil {
log.Info("No template '%s' found. Falling back to default 'pad' template.", padTmpl)
if padTmpl != "" {
log.Info("No template '%s' found. Falling back to default 'pad' template.", padTmpl)
}
padTmpl = "pad"
}

Loading…
Cancel
Save