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

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

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

Logger.isErrorEnabled介绍

[英]Is error enabled boolean.
[中]是启用错误的布尔值。

代码示例

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

  1. if (LOGGER.isErrorEnabled()) {
  2. LOGGER.error("Can't get valid host, will use 127.0.0.1 instead.");

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

  1. if (LOGGER.isErrorEnabled()) {
  2. LOGGER.error("Can't get valid host, will use 127.0.0.1 instead.");

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

  1. static List<String> loadFile(String path) {
  2. List<String> blackPrefixList = new ArrayList<String>();
  3. InputStream input = null;
  4. try {
  5. input = BlackListFileLoader.class.getResourceAsStream(path);
  6. if (input != null) {
  7. readToList(input, "UTF-8", blackPrefixList);
  8. }
  9. String overStr = SofaConfigs.getStringValue(SofaOptions.CONFIG_SERIALIZE_BLACKLIST_OVERRIDE, "");
  10. if (StringUtils.isNotBlank(overStr)) {
  11. if (LOGGER.isInfoEnabled()) {
  12. LOGGER.info("Serialize blacklist will override with configuration: {}", overStr);
  13. }
  14. overrideBlackList(blackPrefixList, overStr);
  15. }
  16. } catch (Exception e) {
  17. if (LOGGER.isErrorEnabled()) {
  18. LOGGER.error(e.getMessage(), e);
  19. }
  20. } finally {
  21. closeQuietly(input);
  22. }
  23. return blackPrefixList;
  24. }

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

  1. static List<String> loadFile(String path) {
  2. List<String> blackPrefixList = new ArrayList<String>();
  3. InputStream input = null;
  4. try {
  5. input = BlackListFileLoader.class.getResourceAsStream(path);
  6. if (input != null) {
  7. readToList(input, "UTF-8", blackPrefixList);
  8. }
  9. String overStr = SofaConfigs.getStringValue(SofaOptions.CONFIG_SERIALIZE_BLACKLIST_OVERRIDE, "");
  10. if (StringUtils.isNotBlank(overStr)) {
  11. if (LOGGER.isInfoEnabled()) {
  12. LOGGER.info("Serialize blacklist will override with configuration: {}", overStr);
  13. }
  14. overrideBlackList(blackPrefixList, overStr);
  15. }
  16. } catch (Exception e) {
  17. if (LOGGER.isErrorEnabled()) {
  18. LOGGER.error(e.getMessage(), e);
  19. }
  20. } finally {
  21. closeQuietly(input);
  22. }
  23. return blackPrefixList;
  24. }

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

  1. /**
  2. * @param path path必须以/结尾
  3. */
  4. protected synchronized void loadFromFile(String path) {
  5. if (LOGGER.isDebugEnabled()) {
  6. LOGGER.debug("Loading extension of extensible {} from path: {}", interfaceName, path);
  7. }
  8. // 默认如果不指定文件名字,就是接口名
  9. String file = StringUtils.isBlank(extensible.file()) ? interfaceName : extensible.file().trim();
  10. String fullFileName = path + file;
  11. try {
  12. ClassLoader classLoader = ClassLoaderUtils.getClassLoader(getClass());
  13. loadFromClassLoader(classLoader, fullFileName);
  14. } catch (Throwable t) {
  15. if (LOGGER.isErrorEnabled()) {
  16. LOGGER.error("Failed to load extension of extensible " + interfaceName + " from path:" + fullFileName,
  17. t);
  18. }
  19. }
  20. }

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

  1. /**
  2. * @param path path必须以/结尾
  3. */
  4. protected synchronized void loadFromFile(String path) {
  5. if (LOGGER.isDebugEnabled()) {
  6. LOGGER.debug("Loading extension of extensible {} from path: {}", interfaceName, path);
  7. }
  8. // 默认如果不指定文件名字,就是接口名
  9. String file = StringUtils.isBlank(extensible.file()) ? interfaceName : extensible.file().trim();
  10. String fullFileName = path + file;
  11. try {
  12. ClassLoader classLoader = ClassLoaderUtils.getClassLoader(getClass());
  13. loadFromClassLoader(classLoader, fullFileName);
  14. } catch (Throwable t) {
  15. if (LOGGER.isErrorEnabled()) {
  16. LOGGER.error("Failed to load extension of extensible " + interfaceName + " from path:" + fullFileName,
  17. t);
  18. }
  19. }
  20. }

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

  1. if (LOGGER.isErrorEnabled(consumerConfig.getAppName())) {
  2. LOGGER.errorWithApp(consumerConfig.getAppName(), "update " + consumerConfig.getInterfaceId() +
  3. " provider (" + providerGroup

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

  1. if (LOGGER.isErrorEnabled(appName)) {
  2. LOGGER.errorWithApp(appName, e.getMessage(), e);

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

  1. if (LOGGER.isErrorEnabled(appName)) {
  2. LOGGER.errorWithApp(appName, e.getMessage(), e);

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

  1. if (LOGGER.isErrorEnabled(consumerConfig.getAppName())) {
  2. LOGGER.errorWithApp(consumerConfig.getAppName(), "update " + consumerConfig.getInterfaceId() +
  3. " provider (" + providerGroup

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

  1. if (LOGGER.isErrorEnabled(appName)) {
  2. LOGGER.errorWithApp(appName, e.getMessage(), e);

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

  1. if (LOGGER.isErrorEnabled(appName)) {
  2. LOGGER.errorWithApp(appName, e.getMessage(), e);

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

  1. if (LOGGER.isErrorEnabled()) {
  2. LOGGER.error("Can't get valid host, will use 127.0.0.1 instead.");

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

  1. static List<String> loadFile(String path) {
  2. List<String> blackPrefixList = new ArrayList<String>();
  3. InputStream input = null;
  4. try {
  5. input = BlackListFileLoader.class.getResourceAsStream(path);
  6. if (input != null) {
  7. readToList(input, "UTF-8", blackPrefixList);
  8. }
  9. String overStr = SofaConfigs.getStringValue(SofaOptions.CONFIG_SERIALIZE_BLACKLIST_OVERRIDE, "");
  10. if (StringUtils.isNotBlank(overStr)) {
  11. if (LOGGER.isInfoEnabled()) {
  12. LOGGER.info("Serialize blacklist will override with configuration: {}", overStr);
  13. }
  14. overrideBlackList(blackPrefixList, overStr);
  15. }
  16. } catch (Exception e) {
  17. if (LOGGER.isErrorEnabled()) {
  18. LOGGER.error(e.getMessage(), e);
  19. }
  20. } finally {
  21. closeQuietly(input);
  22. }
  23. return blackPrefixList;
  24. }

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

  1. /**
  2. * @param path path必须以/结尾
  3. */
  4. protected synchronized void loadFromFile(String path) {
  5. if (LOGGER.isDebugEnabled()) {
  6. LOGGER.debug("Loading extension of extensible {} from path: {}", interfaceName, path);
  7. }
  8. // 默认如果不指定文件名字,就是接口名
  9. String file = StringUtils.isBlank(extensible.file()) ? interfaceName : extensible.file().trim();
  10. String fullFileName = path + file;
  11. try {
  12. ClassLoader classLoader = ClassLoaderUtils.getClassLoader(getClass());
  13. loadFromClassLoader(classLoader, fullFileName);
  14. } catch (Throwable t) {
  15. if (LOGGER.isErrorEnabled()) {
  16. LOGGER.error("Failed to load extension of extensible " + interfaceName + " from path:" + fullFileName,
  17. t);
  18. }
  19. }
  20. }

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

  1. if (LOGGER.isErrorEnabled(consumerConfig.getAppName())) {
  2. LOGGER.errorWithApp(consumerConfig.getAppName(), "update " + consumerConfig.getInterfaceId() +
  3. " provider (" + providerGroup

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

  1. if (LOGGER.isErrorEnabled(appName)) {
  2. LOGGER.errorWithApp(appName, e.getMessage(), e);

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

  1. if (LOGGER.isErrorEnabled(appName)) {
  2. LOGGER.errorWithApp(appName, e.getMessage(), e);

相关文章