本文整理了Java中org.apache.dubbo.common.logger.Logger.isWarnEnabled()
方法的一些代码示例,展示了Logger.isWarnEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isWarnEnabled()
方法的具体详情如下:
包路径:org.apache.dubbo.common.logger.Logger
类名称:Logger
方法名:isWarnEnabled
[英]Is warn logging currently enabled?
[中]当前是否启用了警告日志记录?
代码示例来源:origin: apache/incubator-dubbo
@Override
public boolean isWarnEnabled() {
try {
return logger.isWarnEnabled();
} catch (Throwable t) {
return false;
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public boolean isWarnEnabled() {
return logger.isWarnEnabled();
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public boolean isWarnEnabled() {
try {
return logger.isWarnEnabled();
} catch (Throwable t) {
return false;
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public boolean isWarnEnabled() {
return logger.isWarnEnabled();
}
代码示例来源:origin: apache/incubator-dubbo
public static void warn(Logger logger, Throwable e) {
if (logger == null) {
return;
}
if (logger.isWarnEnabled()) {
logger.warn(e);
}
}
代码示例来源:origin: apache/incubator-dubbo
public static void warn(Logger logger, String msg) {
if (logger == null) {
return;
}
if (logger.isWarnEnabled()) {
logger.warn(msg);
}
}
代码示例来源:origin: apache/incubator-dubbo
public static void warn(Logger logger, String msg, Throwable e) {
if (logger == null) {
return;
}
if (logger.isWarnEnabled()) {
logger.warn(msg, e);
}
}
代码示例来源:origin: apache/incubator-dubbo
public static void warn(Logger logger, String msg) {
if (logger == null) {
return;
}
if (logger.isWarnEnabled()) {
logger.warn(msg);
}
}
代码示例来源:origin: apache/incubator-dubbo
public static void warn(Logger logger, Throwable e) {
if (logger == null) {
return;
}
if (logger.isWarnEnabled()) {
logger.warn(e);
}
}
代码示例来源:origin: apache/incubator-dubbo
public static void warn(Logger logger, String msg, Throwable e) {
if (logger == null) {
return;
}
if (logger.isWarnEnabled()) {
logger.warn(msg, e);
}
}
代码示例来源:origin: apache/incubator-dubbo
private void processCancelledTasks() {
for (; ; ) {
HashedWheelTimeout timeout = cancelledTimeouts.poll();
if (timeout == null) {
// all processed
break;
}
try {
timeout.remove();
} catch (Throwable t) {
if (logger.isWarnEnabled()) {
logger.warn("An exception was thrown while process a cancellation task", t);
}
}
}
}
代码示例来源:origin: apache/incubator-dubbo
public void expire() {
if (!compareAndSetState(ST_INIT, ST_EXPIRED)) {
return;
}
try {
task.run(this);
} catch (Throwable t) {
if (logger.isWarnEnabled()) {
logger.warn("An exception was thrown by " + TimerTask.class.getSimpleName() + '.', t);
}
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
Set<String> resolvedPackagesToScan = resolvePackagesToScan(packagesToScan);
if (!CollectionUtils.isEmpty(resolvedPackagesToScan)) {
registerServiceBeans(resolvedPackagesToScan, registry);
} else {
if (logger.isWarnEnabled()) {
logger.warn("packagesToScan is empty , ServiceBean registry will be ignored!");
}
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
Set<String> resolvedPackagesToScan = resolvePackagesToScan(packagesToScan);
if (!CollectionUtils.isEmpty(resolvedPackagesToScan)) {
registerServiceBeans(resolvedPackagesToScan, registry);
} else {
if (logger.isWarnEnabled()) {
logger.warn("packagesToScan is empty , ServiceBean registry will be ignored!");
}
}
}
代码示例来源:origin: apache/incubator-dubbo
public void expire() {
if (!compareAndSetState(ST_INIT, ST_EXPIRED)) {
return;
}
try {
task.run(this);
} catch (Throwable t) {
if (logger.isWarnEnabled()) {
logger.warn("An exception was thrown by " + TimerTask.class.getSimpleName() + '.', t);
}
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
Set<String> resolvedPackagesToScan = resolvePackagesToScan(packagesToScan);
if (!CollectionUtils.isEmpty(resolvedPackagesToScan)) {
registerServiceBeans(resolvedPackagesToScan, registry);
} else {
if (logger.isWarnEnabled()) {
logger.warn("packagesToScan is empty , ServiceBean registry will be ignored!");
}
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
Set<String> resolvedPackagesToScan = resolvePackagesToScan(packagesToScan);
if (!CollectionUtils.isEmpty(resolvedPackagesToScan)) {
registerServiceBeans(resolvedPackagesToScan, registry);
} else {
if (logger.isWarnEnabled()) {
logger.warn("packagesToScan is empty , ServiceBean registry will be ignored!");
}
}
}
代码示例来源:origin: apache/incubator-dubbo
private void decode(Object message) {
if (message != null && message instanceof Decodeable) {
try {
((Decodeable) message).decode();
if (log.isDebugEnabled()) {
log.debug("Decode decodeable message " + message.getClass().getName());
}
} catch (Throwable e) {
if (log.isWarnEnabled()) {
log.warn("Call Decodeable.decode failed: " + e.getMessage(), e);
}
} // ~ end of catch
} // ~ end of if
} // ~ end of method decode
代码示例来源:origin: apache/incubator-dubbo
private void decode(Object message) {
if (message != null && message instanceof Decodeable) {
try {
((Decodeable) message).decode();
if (log.isDebugEnabled()) {
log.debug("Decode decodeable message " + message.getClass().getName());
}
} catch (Throwable e) {
if (log.isWarnEnabled()) {
log.warn("Call Decodeable.decode failed: " + e.getMessage(), e);
}
} // ~ end of catch
} // ~ end of if
} // ~ end of method decode
代码示例来源:origin: apache/incubator-dubbo
@Override
public void decode() throws Exception {
if (!hasDecoded && channel != null && inputStream != null) {
try {
decode(channel, inputStream);
} catch (Throwable e) {
if (log.isWarnEnabled()) {
log.warn("Decode rpc result failed: " + e.getMessage(), e);
}
response.setStatus(Response.CLIENT_ERROR);
response.setErrorMessage(StringUtils.toString(e));
} finally {
hasDecoded = true;
}
}
}
内容来源于网络,如有侵权,请联系作者删除!