Add template function that will build a string from the given format string and arguments, then log it to ERROR. This has an intended side-effect of causing the build to fail, when executed. Resolves #3817