Implement debug logging for template rendering

This commit is contained in:
Tim Möhlmann
2019-01-08 00:38:06 +02:00
parent e994e94512
commit b04a9d1c28
7 changed files with 47 additions and 9 deletions

View File

@@ -22,7 +22,10 @@ def start_podop():
("sieve", "url", "http://admin/internal/dovecot/§"),
])
convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ))
def convert(src, dst):
logger = log.getLogger("convert()")
logger.debug("Source: %s, Destination: %s", src, dst)
open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ))
@retry(
stop=tenacity.stop_after_attempt(100),