I was thinking along the lines of this @log (which we want for some other things).

{@log level="info|warn|error..." msg="optional message param to="console|output"}
body of log helper
{/log}

so 
{@log level="info"}
{@templateName/}
{/log}

would provide ability to output template name to console or log. It also could replace the need for the to param on contextDump, etc.  It would allow apps to log to where the infra logs things and if we had a level like "ABORT", we could take this to mean to terminate the app also.

A helper-based solution does not deal with the occasional need to actually test or pass the template name. The @provide helper can deal with this for the general helper case so could also handle it for this case.