本文整理了Java中freemarker.log.Logger.isWarnEnabled()
方法的一些代码示例,展示了Logger.isWarnEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isWarnEnabled()
方法的具体详情如下:
包路径:freemarker.log.Logger
类名称:Logger
方法名:isWarnEnabled
[英]Returns true if this logger will log warning messages.
[中]如果此记录器将记录警告消息,则返回true。
代码示例来源:origin: org.freemarker/freemarker
TldParserForTaglibBuilding(ObjectWrapper wrapper) {
if (wrapper instanceof BeansWrapper) {
beansWrapper = (BeansWrapper) wrapper;
} else {
beansWrapper = null;
if (LOG.isWarnEnabled()) {
LOG.warn("Custom EL functions won't be loaded because "
+ (wrapper == null
? "no ObjectWrapper was specified for the TaglibFactory "
+ "(via TaglibFactory.setObjectWrapper(...), exists since 2.3.22)"
: "the ObjectWrapper wasn't instance of " + BeansWrapper.class.getName())
+ ".");
}
}
}
代码示例来源:origin: org.freemarker/freemarker
@SuppressFBWarnings(value={ "MSF_MUTABLE_SERVLET_FIELD", "DC_DOUBLECHECK" }, justification="Performance trick")
private void logWarnOnObjectWrapperMismatch() {
// Deliberately uses double check locking.
if (wrapper != config.getObjectWrapper() && !objectWrapperMismatchWarnLogged && LOG.isWarnEnabled()) {
final boolean logWarn;
synchronized (this) {
logWarn = !objectWrapperMismatchWarnLogged;
if (logWarn) {
objectWrapperMismatchWarnLogged = true;
}
}
if (logWarn) {
LOG.warn(
this.getClass().getName()
+ ".wrapper != config.getObjectWrapper(); possibly the result of incorrect extension of "
+ FreemarkerServlet.class.getName() + ".");
}
}
}
代码示例来源:origin: org.freemarker/freemarker
in = tldLocation.getInputStream();
} catch (IOException e) {
if (LOG.isWarnEnabled()) {
LOG.warn("Ignored classpath TLD location " + StringUtil.jQuoteNoXSS(tldResourcePath)
+ " because of error", e);
代码示例来源:origin: org.freemarker/freemarker
: new PropertyDescriptor(propName, readMethod, null));
} catch (IntrospectionException e) {
if (LOG.isWarnEnabled()) {
LOG.warn("Failed creating property descriptor for " + clazz.getName() + " property " + propName,
e);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker
TldParserForTaglibBuilding(ObjectWrapper wrapper) {
if (wrapper instanceof BeansWrapper) {
beansWrapper = (BeansWrapper) wrapper;
} else {
beansWrapper = null;
if (LOG.isWarnEnabled()) {
LOG.warn("Custom EL functions won't be loaded because "
+ (wrapper == null
? "no ObjectWrapper was specified for the TaglibFactory "
+ "(via TaglibFactory.setObjectWrapper(...), exists since 2.3.22)"
: "the ObjectWrapper wasn't instance of " + BeansWrapper.class.getName())
+ ".");
}
}
}
代码示例来源:origin: org.freemarker/freemarker-gae
TldParserForTaglibBuilding(ObjectWrapper wrapper) {
if (wrapper instanceof BeansWrapper) {
beansWrapper = (BeansWrapper) wrapper;
} else {
beansWrapper = null;
if (LOG.isWarnEnabled()) {
LOG.warn("Custom EL functions won't be loaded because "
+ (wrapper == null
? "no ObjectWrapper was specified for the TaglibFactory "
+ "(via TaglibFactory.setObjectWrapper(...), exists since 2.3.22)"
: "the ObjectWrapper wasn't instance of " + BeansWrapper.class.getName())
+ ".");
}
}
}
代码示例来源:origin: org.freemarker/freemarker-gae
@SuppressFBWarnings(value={ "MSF_MUTABLE_SERVLET_FIELD", "DC_DOUBLECHECK" }, justification="Performance trick")
private void logWarnOnObjectWrapperMismatch() {
// Deliberately uses double check locking.
if (wrapper != config.getObjectWrapper() && !objectWrapperMismatchWarnLogged && LOG.isWarnEnabled()) {
final boolean logWarn;
synchronized (this) {
logWarn = !objectWrapperMismatchWarnLogged;
if (logWarn) {
objectWrapperMismatchWarnLogged = true;
}
}
if (logWarn) {
LOG.warn(
this.getClass().getName()
+ ".wrapper != config.getObjectWrapper(); possibly the result of incorrect extension of "
+ FreemarkerServlet.class.getName() + ".");
}
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker
@SuppressFBWarnings(value={ "MSF_MUTABLE_SERVLET_FIELD", "DC_DOUBLECHECK" }, justification="Performance trick")
private void logWarnOnObjectWrapperMismatch() {
// Deliberately uses double check locking.
if (wrapper != config.getObjectWrapper() && !objectWrapperMismatchWarnLogged && LOG.isWarnEnabled()) {
final boolean logWarn;
synchronized (this) {
logWarn = !objectWrapperMismatchWarnLogged;
if (logWarn) {
objectWrapperMismatchWarnLogged = true;
}
}
if (logWarn) {
LOG.warn(
this.getClass().getName()
+ ".wrapper != config.getObjectWrapper(); possibly the result of incorrect extension of "
+ FreemarkerServlet.class.getName() + ".");
}
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker
in = tldLocation.getInputStream();
} catch (IOException e) {
if (LOG.isWarnEnabled()) {
LOG.warn("Ignored classpath TLD location " + StringUtil.jQuoteNoXSS(tldResourcePath)
+ " because of error", e);
代码示例来源:origin: org.freemarker/freemarker-gae
in = tldLocation.getInputStream();
} catch (IOException e) {
if (LOG.isWarnEnabled()) {
LOG.warn("Ignored classpath TLD location " + StringUtil.jQuoteNoXSS(tldResourcePath)
+ " because of error", e);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker
: new PropertyDescriptor(propName, readMethod, null));
} catch (IntrospectionException e) {
if (LOG.isWarnEnabled()) {
LOG.warn("Failed creating property descriptor for " + clazz.getName() + " property " + propName,
e);
代码示例来源:origin: org.freemarker/freemarker-gae
: new PropertyDescriptor(propName, readMethod, null));
} catch (IntrospectionException e) {
if (LOG.isWarnEnabled()) {
LOG.warn("Failed creating property descriptor for " + clazz.getName() + " property " + propName,
e);
内容来源于网络,如有侵权,请联系作者删除!