本文整理了Java中org.apache.dubbo.common.logger.Logger.error()
方法的一些代码示例,展示了Logger.error()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.error()
方法的具体详情如下:
包路径:org.apache.dubbo.common.logger.Logger
类名称:Logger
方法名:error
[英]Logs a message with error log level.
[中]使用错误日志级别记录消息。
代码示例来源:origin: apache/incubator-dubbo
private void makeClientReady(ZkClient client, Throwable e) {
if (e != null) {
logger.error("Got an exception when trying to create zkclient instance, can not connect to zookeeper server, please check!", e);
} else {
this.client = client;
// this.client.subscribeStateChanges(IZkStateListener);
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void run() {
// check the file change
try {
check();
} catch (Throwable t) { // Defensive fault tolerance
logger.error("Unexpected error occur at reconnect, cause: " + t.getMessage(), t);
}
}
}, 2000, 2000, TimeUnit.MILLISECONDS);
代码示例来源:origin: apache/incubator-dubbo
@Override
public void error(String msg, Throwable e) {
try {
logger.error(appendContextMessage(msg), e);
} catch (Throwable t) {
}
}
代码示例来源:origin: apache/incubator-dubbo
public static void error(Logger logger, Throwable e) {
if (logger == null) {
return;
}
if (logger.isErrorEnabled()) {
logger.error(e);
}
}
代码示例来源:origin: apache/incubator-dubbo
public static void error(Logger logger, String msg) {
if (logger == null) {
return;
}
if (logger.isErrorEnabled()) {
logger.error(msg);
}
}
代码示例来源:origin: apache/incubator-dubbo
public String getDecodedParameter(String key, String defaultValue) {
String value = getParameter(key, defaultValue);
if (value != null && value.length() > 0) {
try {
value = URLDecoder.decode(value, "UTF-8");
} catch (UnsupportedEncodingException e) {
logger.error(e.getMessage(), e);
}
}
return value;
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void createPersistent(String path) {
try {
client.createPersistent(path);
} catch (ZkNodeExistsException e) {
logger.error("zookeeper failed to create persistent node with " + path + ": ", e);
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void createEphemeral(String path) {
try {
client.createEphemeral(path);
} catch (ZkNodeExistsException e) {
logger.error("zookeeper failed to create ephemeral node with " + path + ": ", e);
}
}
代码示例来源:origin: apache/incubator-dubbo
public static void error(Logger logger, Throwable e) {
if (logger == null) {
return;
}
if (logger.isErrorEnabled()) {
logger.error(e);
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void createEphemeral(String path) {
try {
client.createEphemeral(path);
} catch (ZkNodeExistsException e) {
logger.error("zookeeper failed to create ephemeral node with " + path + ": ", e);
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
protected void createPersistent(String path, String data) {
try {
client.createPersistent(path, data);
} catch (ZkNodeExistsException e) {
logger.error("zookeeper failed to create persistent node with " +
path + " and " + data + " : ", e);
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public boolean checkExists(String path) {
try {
return client.exists(path);
} catch (Throwable t) {
logger.error("zookeeper failed to check node existing with " + path + ": ", t);
}
return false;
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void destroy() {
try {
ExecutorUtil.cancelScheduledFuture(sendFuture);
} catch (Throwable t) {
logger.error("Unexpected error occur at cancel sender timer, cause: " + t.getMessage(), t);
}
monitorInvoker.destroy();
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void stop() {
try {
if (context != null) {
context.stop();
context.close();
context = null;
}
} catch (Throwable e) {
logger.error(e.getMessage(), e);
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void close() {
super.close();
try {
ExecutorUtil.cancelScheduledFuture(checkModifiedFuture);
} catch (Throwable t) {
logger.error(t.getMessage(), t);
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void close() {
try {
leave();
} catch (RemotingException e) {
logger.error(e.getMessage(), e);
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void close() {
try {
leave();
} catch (RemotingException e) {
logger.error(e.getMessage(), e);
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void referred(Invoker<?> invoker) throws RpcException {
if (invoker.getUrl().getParameter(Constants.DEPRECATED_KEY, false)) {
LOGGER.error("The service " + invoker.getInterface().getName() + " is DEPRECATED! Declare from " + invoker.getUrl());
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void exceptionOccurred(FilterChainContext ctx, Throwable error) {
Connection<?> connection = ctx.getConnection();
GrizzlyChannel channel = GrizzlyChannel.getOrAddChannel(connection, url, handler);
try {
handler.caught(channel, error);
} catch (RemotingException e) {
logger.error("RemotingException on channel " + channel, e);
} finally {
GrizzlyChannel.removeChannelIfDisconnected(connection);
}
}
代码示例来源:origin: apache/incubator-dubbo
protected static void checkPayload(Channel channel, long size) throws IOException {
int payload = Constants.DEFAULT_PAYLOAD;
if (channel != null && channel.getUrl() != null) {
payload = channel.getUrl().getParameter(Constants.PAYLOAD_KEY, Constants.DEFAULT_PAYLOAD);
}
if (payload > 0 && size > payload) {
ExceedPayloadLimitException e = new ExceedPayloadLimitException("Data length too large: " + size + ", max payload: " + payload + ", channel: " + channel);
logger.error(e);
throw e;
}
}
内容来源于网络,如有侵权,请联系作者删除!