com.alipay.sofa.rpc.log.Logger.error()方法的使用及代码示例

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

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

Logger.error介绍

[英]Error.
[中]错误

代码示例

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
    LOGGER.error("Client channel handler get exception!", cause);
  }
}

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
    LOGGER.error("Client channel handler get exception!", cause);
  }
}

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
    LOGGER.error("", cause);
    ctx.close();
  }
}

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
    LOGGER.error("", cause);
    ctx.close();
  }
}

代码示例来源:origin: alipay/sofa-rpc

private void closePathChildrenCache(Map<String, PathChildrenCache> map) {
  for (Map.Entry<String, PathChildrenCache> entry : map.entrySet()) {
    try {
      entry.getValue().close();
    } catch (Exception e) {
      LOGGER.error("Close PathChildrenCache error!", e);
    }
  }
}

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void filter(ContainerRequestContext requestContext) throws IOException {

    try {
      RestTracerAdapter.serverFilter(requestContext);
    } catch (Exception e) {
      logger.error("the process of rest tracer server request occur error ", e);
    }

  }
}

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void filter(ContainerRequestContext requestContext) throws IOException {

    try {
      RestTracerAdapter.serverFilter(requestContext);
    } catch (Exception e) {
      logger.error("the process of rest tracer server request occur error ", e);
    }

  }
}

代码示例来源:origin: alipay/sofa-rpc

private void closePathChildrenCache(Map<String, PathChildrenCache> map) {
  for (Map.Entry<String, PathChildrenCache> entry : map.entrySet()) {
    try {
      entry.getValue().close();
    } catch (Exception e) {
      LOGGER.error("Close PathChildrenCache error!", e);
    }
  }
}

代码示例来源:origin: alipay/sofa-rpc

private void loadSuccess(String alias, ExtensionClass<T> extensionClass) {
  if (listener != null) {
    try {
      listener.onLoad(extensionClass); // 加载完毕,通知监听器
      all.put(alias, extensionClass);
    } catch (Exception e) {
      LOGGER.error("Error when load extension of extensible " + interfaceClass + " with alias: "
        + alias + ".", e);
    }
  } else {
    all.put(alias, extensionClass);
  }
}

代码示例来源:origin: alipay/sofa-rpc

private void loadSuccess(String alias, ExtensionClass<T> extensionClass) {
  if (listener != null) {
    try {
      listener.onLoad(extensionClass); // 加载完毕,通知监听器
      all.put(alias, extensionClass);
    } catch (Exception e) {
      LOGGER.error("Error when load extension of extensible " + interfaceClass + " with alias: "
        + alias + ".", e);
    }
  } else {
    all.put(alias, extensionClass);
  }
}

代码示例来源:origin: alipay/sofa-rpc

private void statisticReport(SofaTracerSpan span) {
  statReporter.reportStat(span);
  Field statDatas;
  Map<StatKey, StatValues> datas = null;
  try {
    statDatas = getDeclaredField(statReporter, "statDatas");
    statDatas.setAccessible(true);
    datas = (Map<StatKey, StatValues>) statDatas.get(statReporter);
  } catch (IllegalAccessException e) {
    LOGGER.error("statisticReport error", e);
  }
  storeDatas.putAll(datas);
}

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void run() {
    // 状态变化通知监听器
    for (ConsumerStateListener listener : onprepear) {
      try {
        listener.onAvailable(consumerBootstrap.getProxyIns());
      } catch (Exception e) {
        LOGGER.error("Failed to notify consumer state listener when state change to available");
      }
    }
  }
});

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void run() {
    // 状态变化通知监听器
    for (ConsumerStateListener listener : onprepear) {
      try {
        listener.onUnavailable(consumerBootstrap.getProxyIns());
      } catch (Exception e) {
        LOGGER.error("Failed to notify consumer state listener when state change to unavailable");
      }
    }
  }
});

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void run() {
    // 状态变化通知监听器
    for (ConsumerStateListener listener : onprepear) {
      try {
        listener.onUnavailable(consumerBootstrap.getProxyIns());
      } catch (Exception e) {
        LOGGER.error("Failed to notify consumer state listener when state change to unavailable");
      }
    }
  }
});

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void run() {
    // 状态变化通知监听器
    for (ConsumerStateListener listener : onprepear) {
      try {
        listener.onAvailable(consumerBootstrap.getProxyIns());
      } catch (Exception e) {
        LOGGER.error("Failed to notify consumer state listener when state change to available");
      }
    }
  }
});

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void operationComplete(Future future1) throws Exception {
    if (!future1.isSuccess()) {
      Throwable throwable = future1.cause();
      LOGGER.error("Failed to send to "
        + NetUtils.channelToString(localAddress(), remoteAddress())
        + " for msg : " + obj
        + ", Cause by:", throwable);
    }
  }
});

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void operationComplete(Future future1) throws Exception {
    if (!future1.isSuccess()) {
      Throwable throwable = future1.cause();
      LOGGER.error("Failed to send to "
        + NetUtils.channelToString(localAddress(), remoteAddress())
        + " for msg : " + obj
        + ", Cause by:", throwable);
    }
  }
});

代码示例来源:origin: alipay/sofa-rpc

/**
 * 关闭全部客户端连接
 */
public static void closeAll() {
  if (LOGGER.isInfoEnabled()) {
    LOGGER.info("Shutdown all client transport now!");
  }
  try {
    CLIENT_TRANSPORT_HOLDER.destroy();
  } catch (Exception e) {
    LOGGER.error(e.getMessage(), e);
  }
}

代码示例来源:origin: alipay/sofa-rpc

/**
 * 关闭全部客户端连接
 */
public static void closeAll() {
  if (LOGGER.isInfoEnabled()) {
    LOGGER.info("Shutdown all client transport now!");
  }
  try {
    CLIENT_TRANSPORT_HOLDER.destroy();
  } catch (Exception e) {
    LOGGER.error(e.getMessage(), e);
  }
}

代码示例来源:origin: alipay/sofa-rpc

@Override
  public void operationComplete(ChannelFuture future) throws Exception {
    if (future.isSuccess()) {
      if (LOGGER.isInfoEnabled()) {
        LOGGER.info("HTTP/2 Server bind to {}:{} success!",
          transportConfig.getHost(), transportConfig.getPort());
      }
    } else {
      LOGGER.error("HTTP/2 Server bind to {}:{} failed!",
        transportConfig.getHost(), transportConfig.getPort());
      stop();
    }
  }
});

相关文章