template: let callers route the unset variable warning to a logger

Add a logging.Logger contract and a template.WithLogger option. Without
the option, the warning is still written through the standard logrus
logger, unchanged. Default values and error messages carried by a
substitution, as well as the text following a braced expression, report
to the same logger as the outer substitution.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2026-10-22 17:26:18 +02:00 • committed by Nicolas De loof
commit 414395c352
4 changed files with 248 additions and 28 deletions