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).
This commit is contained in:
Matt Baer 2019-11-12 08:07:51 +09:00
parent bca678aee5
commit 80362000fe
1 changed files with 3 additions and 1 deletions

4
pad.go
View File

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