本文整理了Java中freemarker.log.Logger.debug()
方法的一些代码示例,展示了Logger.debug()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.debug()
方法的具体详情如下:
包路径:freemarker.log.Logger
类名称:Logger
方法名:debug
[英]Logs a debugging message.
[中]记录调试消息。
代码示例来源:origin: org.freemarker/freemarker
static public void useSunInternalXPathSupport() throws Exception {
Class.forName("com.sun.org.apache.xpath.internal.XPath");
Class c = Class.forName("freemarker.ext.dom.SunInternalXalanXPathSupport");
synchronized (STATIC_LOCK) {
xpathSupportClass = c;
}
LOG.debug("Using Sun's internal Xalan classes for XPath support");
}
代码示例来源:origin: org.freemarker/freemarker
/**
* Convenience method. Tells the system to use Xalan for XPath queries.
* @throws Exception if the Xalan XPath classes are not present.
*/
static public void useXalanXPathSupport() throws Exception {
Class.forName("org.apache.xpath.XPath");
Class c = Class.forName("freemarker.ext.dom.XalanXPathSupport");
synchronized (STATIC_LOCK) {
xpathSupportClass = c;
}
LOG.debug("Using Xalan classes for XPath support");
}
代码示例来源:origin: org.freemarker/freemarker
/**
* Convenience method. Tells the system to use Jaxen for XPath queries.
* @throws Exception if the Jaxen classes are not present.
*/
static public void useJaxenXPathSupport() throws Exception {
Class.forName("org.jaxen.dom.DOMXPath");
Class c = Class.forName("freemarker.ext.dom.JaxenXPathSupport");
jaxenXPathSupport = (XPathSupport) c.newInstance();
synchronized (STATIC_LOCK) {
xpathSupportClass = c;
}
LOG.debug("Using Jaxen classes for XPath support");
}
代码示例来源:origin: org.freemarker/freemarker
private void logNoSuchKey(String key, Map<?, ?> keyMap) {
LOG.debug("Key " + StringUtil.jQuoteNoXSS(key) + " was not found on instance of " +
object.getClass().getName() + ". Introspection information for " +
"the class is: " + keyMap);
}
代码示例来源:origin: org.freemarker/freemarker
private void addTldLocationsFromWebXml() throws SAXException, IOException {
LOG.debug("Looking for TLD locations in servletContext:/WEB-INF/web.xml");
WebXmlParser webXmlParser = new WebXmlParser();
InputStream in = servletContext.getResourceAsStream("/WEB-INF/web.xml");
if (in == null) {
LOG.debug("No web.xml was found in servlet context");
return;
}
try {
parseXml(in, servletContext.getResource("/WEB-INF/web.xml").toExternalForm(), webXmlParser);
} finally {
in.close();
}
}
代码示例来源:origin: org.freemarker/freemarker
private void addTldLocationsFromWebInfTlds()
throws IOException, SAXException {
LOG.debug("Looking for TLD locations in servletContext:/WEB-INF/**/*.tld");
addTldLocationsFromServletContextResourceTlds("/WEB-INF");
}
代码示例来源:origin: org.freemarker/freemarker
LOG.debug("Failed to use Xalan XPath support.", e);
} catch (IllegalAccessError e) {
LOG.debug("Failed to use Xalan internal XPath support.", e);
useSunInternalXPathSupport();
} catch (Exception e) {
LOG.debug("Failed to use Sun internal XPath support.", e);
} catch (IllegalAccessError e) {
LOG.debug("Failed to use Sun internal XPath support. "
+ "Tip: On Java 9+, you may need Xalan or Jaxen+Saxpath.", e);
LOG.debug("Failed to use Jaxen XPath support.", e);
} catch (IllegalAccessError e) {
LOG.debug("Failed to use Jaxen XPath support.", e);
代码示例来源: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
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 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 (jarFile != null) {
if (LOG.isDebugEnabled()) {
LOG.debug("Scanning for " + META_INF_ABS_PATH + "*.tld-s in JarFile: servletContext:"
+ jarResourcePath);
LOG.debug("Scanning for " + META_INF_ABS_PATH
+ "*.tld-s in ZipInputStream (slow): servletContext:" + jarResourcePath);
代码示例来源: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
LOG.debug("Looking for TLD locations in TLD-s specified in cfg.classpathTlds");
代码示例来源:origin: org.freemarker/freemarker
ATTEMPT_LOGGER.debug("Error in attempt block " +
attemptBlock.getStartLocationQuoted(), thrownException);
代码示例来源:origin: org.freemarker/freemarker
ClasspathMetaInfTldSource cpMiTldLocation = (ClasspathMetaInfTldSource) miTldSource;
if (LOG.isDebugEnabled()) {
LOG.debug("Looking for TLD-s in "
+ "classpathRoots[" + cpMiTldLocation.getRootContainerPattern() + "]"
+ META_INF_ABS_PATH + "**/*.tld");
} 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
LOG.debug(debugName + " was removed from the cache, if it was there");
内容来源于网络,如有侵权,请联系作者删除!