org.tinygroup.logger.Logger.warnMessage()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(215)

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

Logger.warnMessage介绍

暂无

代码示例

代码示例来源:origin: org.tinygroup/org.tinygroup.earthworm

  1. public static void setLogSupport(String logSupportClass) {
  2. try {
  3. logSupport = (LogSupport) Class.forName(logSupportClass).newInstance();
  4. LOGGER.infoMessage("using logSupportClass class:{}", logSupportClass);
  5. } catch (Exception e) {
  6. LOGGER.warnMessage("set logSupportClass exception,class:{},reason:{}",
  7. logSupportClass, e.getClass().getName());
  8. }
  9. }

代码示例来源:origin: org.tinygroup/org.tinygroup.earthworm

  1. public static void setSampleTrier(String sampleTrierClass) {
  2. try {
  3. sampleTrier = (SampleTrier) Class.forName(sampleTrierClass)
  4. .newInstance();
  5. LOGGER.infoMessage("using sampleTrierClass class:{0}", sampleTrierClass);
  6. } catch (Exception e) {
  7. LOGGER.warnMessage("set sampleTrierClass exception.class:{0},reason:{1}",
  8. sampleTrierClass, e.getClass().getName());
  9. }
  10. }

代码示例来源:origin: org.tinygroup/org.tinygroup.remoteconfig.zk

  1. public static void addSessionTimeoutHandler(ConnectionStateListener listener) {
  2. if(sessionTimeoutHandlerFlag == false){
  3. curator.getConnectionStateListenable().addListener(listener);
  4. sessionTimeoutHandlerFlag = true;
  5. }else{
  6. LOGGER.warnMessage("远程配置,请不要重复发起zookeeper session失效的补偿处理");
  7. }
  8. }

代码示例来源:origin: org.tinygroup/org.tinygroup.config

  1. /**
  2. * @param key 对应的配置项key
  3. * @param defaultValue 配置项默认取值
  4. * @param notallowParseException 是否抛出数据类型转换过程中产生的异常
  5. * 若为true,当将配置值转换为Boolean时发生异常,则将该异常抛出
  6. * 若未false,则该异常不抛出,并返回defaultValue
  7. * @return
  8. */
  9. public static Boolean getBoolean(String key, Boolean defaultValue, boolean notallowParseException) {
  10. String value = getValue(key);
  11. if (StringUtil.isBlank(value)) {
  12. return defaultValue;
  13. } else if (notallowParseException) {
  14. return Boolean.valueOf(value);
  15. }
  16. try {
  17. return Boolean.valueOf(value);
  18. } catch (Exception e) {
  19. LOGGER.warnMessage("转换配置参数:{}为Boolean时出错,值:{}", key, value);
  20. return defaultValue;
  21. }
  22. }

代码示例来源:origin: org.tinygroup/org.tinygroup.config

  1. /**
  2. * @param key 对应的配置项key
  3. * @param defaultValue 配置项默认取值
  4. * @param notallowParseException 是否抛出数据类型转换过程中产生的异常
  5. * 若为true,当将配置值转换为Integer时发生异常,则将该异常抛出
  6. * 若未false,则该异常不抛出,并返回defaultValue
  7. * @return
  8. */
  9. public static Integer getInteger(String key, Integer defaultValue, boolean notallowParseException) {
  10. String value = getValue(key);
  11. if (StringUtil.isBlank(value)) {
  12. return defaultValue;
  13. } else if (notallowParseException) {
  14. return Integer.valueOf(value);
  15. }
  16. try {
  17. return Integer.valueOf(value);
  18. } catch (Exception e) {
  19. LOGGER.warnMessage("转换配置参数:{}为Integer时出错,值:{}", key, value);
  20. return defaultValue;
  21. }
  22. }

代码示例来源:origin: org.tinygroup/org.tinygroup.config

  1. /**
  2. * @param key 对应的配置项key
  3. * @param defaultValue 配置项默认取值
  4. * @param notallowParseException 是否抛出数据类型转换过程中产生的异常
  5. * 若为true,当将配置值转换为Int时发生异常,则将该异常抛出
  6. * 若未false,则该异常不抛出,并返回defaultValue
  7. * @return
  8. */
  9. public static int getInt(String key, int defaultValue, boolean notallowParseException) {
  10. String value = getValue(key);
  11. if (StringUtil.isBlank(value)) {
  12. return defaultValue;
  13. } else if (notallowParseException) {
  14. return Integer.parseInt(value);
  15. }
  16. try {
  17. return Integer.parseInt(value);
  18. } catch (Exception e) {
  19. LOGGER.warnMessage("转换配置参数:{}为Int时出错,值:{}", key, value);
  20. return defaultValue;
  21. }
  22. }

代码示例来源:origin: org.tinygroup/org.tinygroup.config

  1. LOGGER.warnMessage("not found var:{}", var);
  2. buf.append(var);

代码示例来源:origin: org.tinygroup/org.tinygroup.cepcorebase

  1. logger.warnMessage("cepcore nodename is not configration,generate a random one");
  2. nodeName = UUID.randomUUID().toString();
  3. OPERATOR_ATTRIBUTE);
  4. if (StringUtil.isBlank(operatorName)) {
  5. logger.warnMessage("cepcore operator is not configration");

代码示例来源:origin: org.tinygroup/org.tinygroup.remoteconfig.zk

  1. /**
  2. * 发起监控
  3. *
  4. * @param clientId
  5. * @param listener
  6. */
  7. public static void startWatch(String clientId, NodeCacheListener listener) {
  8. String node = PathHelper.createPublishPath(clientId, getConfigPath());
  9. if (nodeCache == null) {
  10. nodeCache = new NodeCache(curator, node);
  11. }
  12. nodeCache.getListenable().clear();
  13. nodeCache.getListenable().addListener(listener);
  14. if (watchFlag == false) {
  15. try {
  16. nodeCache.start();
  17. watchFlag = true;
  18. } catch (Exception e) {
  19. throw new BaseRuntimeException("0TE120119016", e, node);
  20. }
  21. }else{
  22. LOGGER.warnMessage("远程配置,请不要重复发起针对节点[{}]的监听", node);
  23. }
  24. }

相关文章