Add logging template tag for v1 templates. Issue #341.