freemarker.log.Logger.isDebugEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(158)

本文整理了Java中freemarker.log.Logger.isDebugEnabled()方法的一些代码示例,展示了Logger.isDebugEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isDebugEnabled()方法的具体详情如下:
包路径:freemarker.log.Logger
类名称:Logger
方法名:isDebugEnabled

Logger.isDebugEnabled介绍

[英]Returns true if this logger will log debug messages.
[中]如果此记录器将记录调试消息,则返回true。

代码示例

代码示例来源:origin: org.freemarker/freemarker

private static Navigator getNavigator(String navType) {
  try {
    return (Navigator) ClassUtil.forName("freemarker.ext.xml._" + 
        navType + "Navigator").newInstance();
  } catch (Throwable t) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Could not load navigator for " + navType, t);
    }
    return null;
  }
}

代码示例来源:origin: org.freemarker/freemarker

private static Class getClass(String className) {
  try {
    return ClassUtil.forName(className);
  } catch (Exception e) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Couldn't load class " + className, e);
    }
    return null;
  }
}

代码示例来源:origin: org.freemarker/freemarker

private void addTldLocationsFromWebInfPerLibJarMetaInfTlds() throws IOException, SAXException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("Looking for TLD locations in servletContext:/WEB-INF/lib/*.{jar,zip}" + META_INF_ABS_PATH
        + "*.tld");
  }
  Set libEntPaths = servletContext.getResourcePaths("/WEB-INF/lib");
  if (libEntPaths != null) {
    for (Iterator iter = libEntPaths.iterator(); iter.hasNext(); ) {
      final String libEntryPath = (String) iter.next();
      if (isJarPath(libEntryPath)) {
        addTldLocationsFromServletContextJar(libEntryPath);
      }
    }
  }
}

代码示例来源:origin: org.freemarker/freemarker

private void addTldLocation(TldLocation tldLocation, String taglibUri) {
  if (tldLocations.containsKey(taglibUri)) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Ignored duplicate mapping of taglib URI " + StringUtil.jQuoteNoXSS(taglibUri)
          + " to TLD location " + StringUtil.jQuoteNoXSS(tldLocation));
    }
  } else {
    tldLocations.put(taglibUri, tldLocation);
    if (LOG.isDebugEnabled()) {
      LOG.debug("Mapped taglib URI " + StringUtil.jQuoteNoXSS(taglibUri)
          + " to TLD location " + StringUtil.jQuoteNoXSS(tldLocation));
    }
  }
}

代码示例来源:origin: org.freemarker/freemarker

/**
 * @param tldLocation
 *            The physical location of the TLD file
 * @param taglibUri
 *            The URI used in templates to refer to the taglib (like {@code <%@ taglib uri="..." ... %>} in JSP).
 */
private TemplateHashModel loadTaglib(TldLocation tldLocation, String taglibUri) throws IOException, SAXException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("Loading taglib for URI " + StringUtil.jQuoteNoXSS(taglibUri)
        + " from TLD location " + StringUtil.jQuoteNoXSS(tldLocation));
  }
  final Taglib taglib = new Taglib(servletContext, tldLocation, objectWrapper);
  taglibs.put(taglibUri, taglib);
  tldLocations.remove(taglibUri);
  return taglib;
}

代码示例来源:origin: org.freemarker/freemarker

final String listingEntry = listing[i];
if (fileName.equalsIgnoreCase(listingEntry)) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("Emulating file-not-found because of letter case differences to the "
        + "real file, for: " + sourcePath);

代码示例来源:origin: org.freemarker/freemarker

private void addTldLocationsFromFileDirectory(final File dir) throws IOException, SAXException {
  if (dir.isDirectory()) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Scanning for *.tld-s in File directory: " + StringUtil.jQuoteNoXSS(dir));
    }
    File[] tldFiles = dir.listFiles(new FilenameFilter() {

      public boolean accept(File urlAsFile, String name) {
        return isTldFileNameIgnoreCase(name);
      }

    });
    if (tldFiles == null) {
      throw new IOException("Can't list this directory for some reason: " + dir);
    }
    for (int i = 0; i < tldFiles.length; i++) {
      final File file = tldFiles[i];
      addTldLocationFromTld(new FileTldLocation(file));
    }
  } else {
    LOG.warn("Skipped scanning for *.tld for non-existent directory: " + StringUtil.jQuoteNoXSS(dir));
  }
}

代码示例来源:origin: org.freemarker/freemarker

private Object findTemplateSource(String path) throws IOException {
  final Object result = templateLoader.findTemplateSource(path);
  if (LOG.isDebugEnabled()) {
    LOG.debug("TemplateLoader.findTemplateSource(" +  StringUtil.jQuote(path) + "): "
        + (result == null ? "Not found" : "Found"));
  }
  return modifyForConfIcI(result);
}

代码示例来源:origin: org.freemarker/freemarker

if (LOG.isDebugEnabled()) {
  LOG.debug("Scanning for " + META_INF_ABS_PATH + "*.tld-s in JarFile: servletContext:"
      + jarResourcePath);
if (LOG.isDebugEnabled()) {
  LOG.debug("Scanning for " + META_INF_ABS_PATH
      + "*.tld-s in ZipInputStream (slow): servletContext:" + jarResourcePath);

代码示例来源:origin: org.freemarker/freemarker

if (ATTEMPT_LOGGER.isDebugEnabled()) {
  ATTEMPT_LOGGER.debug("Error in attempt block " +
      attemptBlock.getStartLocationQuoted(), thrownException);

代码示例来源:origin: org.freemarker/freemarker

} else if (miTldSource instanceof ClasspathMetaInfTldSource) {
  ClasspathMetaInfTldSource cpMiTldLocation = (ClasspathMetaInfTldSource) miTldSource;
  if (LOG.isDebugEnabled()) {
    LOG.debug("Looking for TLD-s in "
        + "classpathRoots[" + cpMiTldLocation.getRootContainerPattern() + "]"
        addTldLocationsFromJarDirectoryEntryURL(url);
      } else {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Can't list entries under this URL; TLD-s won't be discovered here: "
              + urlWithEF.getExternalForm());

代码示例来源:origin: org.freemarker/freemarker

if (LOG.isDebugEnabled()) {
  LOG.debug("Scanning for " + META_INF_ABS_PATH + "**/*.tld-s in random access mode: "
      + jarBaseEntryUrl);
if (LOG.isDebugEnabled()) {
  LOG.debug("Scanning for " + META_INF_ABS_PATH + "**/*.tld-s in stream mode (slow): "
      + rawJarContentUrlEF);

代码示例来源:origin: org.freemarker/freemarker

boolean debug = LOG.isDebugEnabled();
String debugName = debug
    ? buildDebugName(name, locale, customLookupCondition, encoding, parse)

代码示例来源:origin: org.freemarker/freemarker

if (LOG.isDebugEnabled()) {
  LOG.debug("Requested template " + StringUtil.jQuoteNoXSS(templatePath) + ".");
        "Template not found for name " + StringUtil.jQuoteNoXSS(templatePath) + ".", e);
  } else {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Responding HTTP 404 \"Not found\" for missing template "
          + StringUtil.jQuoteNoXSS(templatePath) + ".", e);

代码示例来源:origin: org.freemarker/freemarker

if (LOG.isDebugEnabled()) {
  LOG.debug("Using object wrapper: " + wrapper);

代码示例来源:origin: org.freemarker/freemarker

if (LOG.isDebugEnabled()) {
  LOG.debug("Initial encoding \"" + initialEncoding + "\" was incorrect, re-reading with \""
      + actualEncoding + "\". Template: " + sourceName);

代码示例来源:origin: org.freemarker/freemarker

if (wrapper.isStrict()) {
  throw new InvalidPropertyException("No such bean property: " + key);
} else if (LOG.isDebugEnabled()) {
  logNoSuchKey(key, classInfo);

代码示例来源:origin: org.freemarker/freemarker

final String normalizedTaglibUri;
try {
  if (LOG.isDebugEnabled()) {
    LOG.debug("Locating TLD for taglib URI " + StringUtil.jQuoteNoXSS(taglibUri) + ".");

代码示例来源:origin: org.freemarker/freemarker

final String encoding, final boolean parseAsFTL)
throws IOException {
  final boolean debug = LOG.isDebugEnabled();
  final String debugName = debug
      ? buildDebugName(name, locale, customLookupCondition, encoding, parseAsFTL)

代码示例来源:origin: org.freemarker/com.springsource.freemarker

static public void useSunInternalXPathSupport() throws Exception {
  Class.forName("com.sun.org.apache.xpath.internal.XPath");
  Class c = Class.forName("freemarker.ext.dom.SunInternalXalanXPathSupport");
  if (logger.isDebugEnabled()) {
    logger.debug("Using Sun's internal Xalan classes for XPath support");
  }
  xpathSupportClass = c;
}

相关文章