From 80362000feedae19e51bbc7ab7afb4283a762361 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Tue, 12 Nov 2019 08:07:51 +0900 Subject: [PATCH] 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). --- pad.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pad.go b/pad.go index db356c4..37d1c9b 100644 --- a/pad.go +++ b/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" }