同 System.err.println()方法，打印控制台日志

@param t 异常对象
@param template 文本模板，被替换的部分用 {} 表示
@param values 值
502168
public static void error(Throwable t, String template, Object... values) {
		err.println(StrUtil.format(template, values));
		if (null != t) {
			t.printStackTrace(err);
			err.flush();
		}
	}
118768
public void delTemplateEntry(String template, Object entry) {
        if (htod.delTemplateEntry(template, entry) == HTODDynacache.DISK_EXCEPTION) {
            stopOnError(this.htod.diskCacheException);
        }
    }
111602
public void registerTemplate(ITemplate template) {
        //TemplateResourceManager rm = resourceManager();
        String name;
        if (template instanceof JavaTagBase) {
            name = template.__getName();
        } else {
            name = template.__getTemplateClass(false).getTagName();
        }
        registerTemplate(name, template);
    }
1024307
@SuppressWarnings("unchecked")
    public <T extends XPathBuilder> T setTemplate(final String key, final String value) {
        if (value == null) {
            templates.remove(key);
        } else {
            templates.put(key, value);
        }
        return (T) this;
    }
462801
private synchronized String printTargetError( Throwable t ) {
            StringBuilder msgs = new StringBuilder(t.toString());
            while ( null != (t = t.getCause()) )
                msgs.append("\n").append(t.toString());
            return msgs.toString();
    }
518536
public JsonResponse getTemplate(String template) throws IOException {
        Map<String, Object> data = new HashMap<String, Object>();
        data.put(Template.PARAM_TEMPLATE, template);
        return apiGet(ApiAction.template, data);
    }
1172279
private void checkTemplate(TemplateNode node, TemplateRegistry templateRegistry) {
    ListMultimap<String, SourceLocation> dataKeys = ArrayListMultimap.create();

    for (VarRefNode varRefNode : SoyTreeUtils.getAllNodesOfType(node, VarRefNode.class)) {
      if (varRefNode.isPossibleHeaderVar()) {
        dataKeys.put(varRefNode.getName(), varRefNode.getSourceLocation());
      }
    }

    IndirectParamsInfo ipi =
        new IndirectParamsCalculator(templateRegistry)
            .calculateIndirectParams(templateRegistry.getMetadata(node));

    Set<String> allHeaderVarNames = new HashSet<>();
    List<TemplateHeaderVarDefn> unusedParams = new ArrayList<>();
    // Process @param header variables.
    for (TemplateParam param : node.getAllParams()) {
      allHeaderVarNames.add(param.name());
      if (dataKeys.containsKey(param.name())) {
        // Good: Declared and referenced in template. We remove these from dataKeys so
        // that at the end of the for-loop, dataKeys will only contain the keys that are referenced
        // but not declared in SoyDoc.
        dataKeys.removeAll(param.name());
      } else if (ipi.paramKeyToCalleesMultimap.containsKey(param.name())
          || ipi.mayHaveIndirectParamsInExternalCalls
          || ipi.mayHaveIndirectParamsInExternalDelCalls) {
        // Good: Declared in SoyDoc and either (a) used in a call that passes all data or (b) used
        // in an external call or delcall that passes all data, which may need the param (we can't
        // verify).
      } else {
        // Bad: Declared in SoyDoc but not referenced in template.
        unusedParams.add(param);
      }
    }

    List<TemplateHeaderVarDefn> unusedStateVars = new ArrayList<>();
    // Process @state header variables.
    if (node instanceof TemplateElementNode) {
      TemplateElementNode el = (TemplateElementNode) node;
      for (TemplateStateVar stateVar : el.getStateVars()) {
        allHeaderVarNames.add(stateVar.name());
        if (dataKeys.containsKey(stateVar.name())) {
          // Good: declared and referenced in the template.
          dataKeys.removeAll(stateVar.name());
        } else {
          // Bad: declared in the header, but not used.
          unusedStateVars.add(stateVar);
        }
      }
    }
    // At this point, the only keys left in dataKeys are undeclared.
    for (Entry<String, SourceLocation> undeclared : dataKeys.entries()) {
      String extraErrorMessage =
          SoyErrors.getDidYouMeanMessage(allHeaderVarNames, undeclared.getKey());
      errorReporter.report(
          undeclared.getValue(), UNDECLARED_DATA_KEY, undeclared.getKey(), extraErrorMessage);
    }

    // Delegate templates can declare unused params because other implementations
    // of the same delegate may need to use those params.
    if (node instanceof TemplateBasicNode) {
      reportUnusedHeaderVars(errorReporter, unusedParams, UNUSED_PARAM);
    }
    if (node instanceof TemplateElementNode) {
      reportUnusedHeaderVars(errorReporter, unusedStateVars, UNUSED_STATE);
    }
  }
806065
public void updateErrorTemplate(int statusCode, String template) throws SecurityException {
	checkWriteAccess();
	boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_DEBUGGING);
	if (!hasAccess) throw new SecurityException("no access to change error settings");

	Element error = _getRootElement("error");
	// if(template.trim().length()>0)
	error.setAttribute("template-" + statusCode, template);
    }
1064431
public void addTemplate( String templateName, URLTemplate template )
    {
        if ( templateName == null || templateName.length() == 0 )
        {
            throw new IllegalArgumentException( "Template name cannot be null or empty." );
        }

        if ( template == null )
        {
            throw new IllegalArgumentException( "URLTemplate cannot be null." );
        }

        _templates.put( templateName, template );
    }
482890
private final void renderContentTemplate(final ST contentTemplate, final Writer writer, final Map<String, Object> values/*, final String language*/, final ErrorBuffer error) {
        injectTemplateValues(contentTemplate, values);
//        if (language == null)
            contentTemplate.write(createSTWriter(writer), error);
//        else
//            contentTemplate.write(createSTWriter(writer), new Locale(language), error);
    }
147677
protected void logException (final Object caller, final Throwable t, final Object[] parameters) {
		logException(t, "{}: Exception in '{}' for parameters: {}", new Object[] { getReplacement(), caller, getParametersAsString(parameters) });
	}
392084
function(template, values, pattern) {
      pattern = pattern || /\{([^{}]*)\}/g;
      return template.replace(pattern, function(a, b) {
        var p = b.split('.'),
          r = values;
        try {
          for (var s in p) {
            if (p.hasOwnProperty(s)) {
              r = r[p[s]];
            }
          }
        } catch (e) {
          r = a;
        }
        return (typeof r === 'string' || typeof r === 'number') ? r : a;
      });
    }
1005577
public static function quickTemp($template = '', $values = array())
	{
		if (!\is_array($values) && !\is_object($values)) {
			$values = \func_get_args();
			\array_shift($values);
		}
		self::$temp = $values;
		// $regex = '/\\\\?[<\[](::|%)\s*(.*?)\s*\\1[>\]]/';
		$regex = '@\\\\?(?:
        \{\{\s*(.*?)\s*\}\}|           # {{a}}
        \[::\s*(.*?)\s*::\]            # [::a::]
        # <::\s*(.*?)\s*::>|           # <::a::>
        # <!--::\s*+(.*?)\s*+::-->|    # <!--::a::-->
        # \/\*::\s*(.*?)\s*::\*\/      # /*::a::*/
        )@sx';
		$return = \preg_replace_callback($regex, array(__CLASS__, 'quickTempCallback'), $template);
		self::$temp = null;
		return $return;
	}
1218449
public void javacError(String message, Throwable t) {
		messager.printMessage(Diagnostic.Kind.ERROR, message + (t == null ? "" : (": " + t)));
		if (t != null) t.printStackTrace();
	}
976719
public void printError() {
    System.out.print(description);
    if (value != null)
      System.out.print(" (" + value + ")");
    System.out.println();
  }
419681
public void loadTemplates() throws TemplateException {
        loadStrategyI.loadTemplates();
        this.templateSet = loadStrategyI.getTemplates();
        this.templateOrders = loadStrategyI.getOrders();
    }
283944
public static String printStackTrace(Throwable t) {
        return t == null ? PcConstants.NA : ExceptionUtils.getStackTrace(t);

    }