Selaa lähdekoodia

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 4 vuotta sitten
vanhempi
commit
80362000fe
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. +3
    -1
      pad.go

+ 3
- 1
pad.go Näytä tiedosto

@@ -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"
}



Ladataan…
Peruuta
Tallenna