top.wboost.common.log.entity.Logger.debug()方法的使用及代码示例

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

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

Logger.debug介绍

暂无

代码示例

代码示例来源:origin: top.wboost/common-utils

  1. public static void debug() {
  2. StackTraceElement[] stacks = (new Throwable()).getStackTrace();
  3. for (StackTraceElement stack : stacks) {
  4. log.debug(stack.getClassName() + "-" + stack.getMethodName());
  5. }
  6. }

代码示例来源:origin: top.wboost/common-web

  1. public static void loadMessageByPath(String path) {
  2. log.debug("loadMessageByPath... {}", path);
  3. Properties messageProperties = PropertiesUtil.loadProperties(path);
  4. for (Entry<Object, Object> businessCode : messageProperties.entrySet()) {
  5. try {
  6. Integer code = Integer.valueOf((String) businessCode.getKey());
  7. String message = (String) businessCode.getValue();
  8. codeMessageMap.put(code, message == null ? "" : message);
  9. } catch (Exception e) {
  10. log.error("key : {},value: {} ,error is : {}", businessCode.getKey(), businessCode.getValue(),
  11. e.getLocalizedMessage());
  12. }
  13. }
  14. log.debug("loadMessageByPath end...");
  15. }

代码示例来源:origin: top.wboost/common-web

  1. /**
  2. * 读取配置文件信息
  3. */
  4. private void loadMessage() {
  5. log.debug("init code and message...");
  6. Properties messageProperties = PropertiesUtil.loadProperties(this.realMessagePath);
  7. for (Entry<Object, Object> businessCode : messageProperties.entrySet()) {
  8. try {
  9. Integer code = Integer.valueOf((String) businessCode.getKey());
  10. String message = (String) businessCode.getValue();
  11. codeMessageMap.put(code, message == null ? "" : message);
  12. } catch (Exception e) {
  13. log.error("key : {},value: {} ,error is : {}", businessCode.getKey(), businessCode.getValue(),
  14. e.getLocalizedMessage());
  15. }
  16. }
  17. log.debug("init code and message end...");
  18. }

代码示例来源:origin: top.wboost/common-boost

  1. /**
  2. * 执行并组装sql语句
  3. * @param sql 要执行的sql语句
  4. * @return
  5. */
  6. protected List<Map<String, Object>> executeSqlAuto(Map<String, Object> replaceMap, String sql) {
  7. List<String> autoFieldsName = sqlWildCardManager.getAutoFieldsNames(sql);
  8. log.debug("auto get fieldsName:{}", autoFieldsName);
  9. return executeSql(replaceMap, sql, autoFieldsName.toArray(new String[autoFieldsName.size()]));
  10. }

代码示例来源:origin: top.wboost/common-sql

  1. public String render() {
  2. final StringBuilder buf = new StringBuilder(selectValueList.size() * 10);
  3. final HashSet<String> uniqueAliases = new HashSet<String>();
  4. boolean firstExpression = true;
  5. for (SelectValue selectValue : selectValueList) {
  6. if (selectValue.alias != null) {
  7. if (!uniqueAliases.add(selectValue.alias)) {
  8. log.debug("Skipping select-value with non-unique alias");
  9. continue;
  10. }
  11. }
  12. if (firstExpression) {
  13. firstExpression = false;
  14. } else {
  15. buf.append(", ");
  16. }
  17. if (selectValue.qualifier != null) {
  18. buf.append(selectValue.qualifier).append('.');
  19. }
  20. buf.append(selectValue.value);
  21. if (selectValue.alias != null) {
  22. buf.append(" as ").append(selectValue.alias);
  23. }
  24. }
  25. return buf.toString();
  26. }
  27. }

代码示例来源:origin: top.wboost/common-boost

  1. /**
  2. * 执行sql语句
  3. * @param sql 要执行的sql语句
  4. * @return
  5. */
  6. protected List<?> executeSql(Map<String, Object> replaceMap, String sql) {
  7. String executeSql = replaceSql(replaceMap, sql);
  8. log.debug("execute sql : {}", executeSql);
  9. try {
  10. return jdbcExecutor.findModeResult(executeSql);
  11. } catch (SQLException e) {
  12. throw new RuntimeException(e);
  13. }
  14. }

代码示例来源:origin: top.wboost/common-web

  1. public HttpRequestBuilder addParameter(final String name, final String value, Boolean canEmpty) {
  2. if ((!canEmpty) && (!StringUtil.notEmpty(value))) {
  3. if (log.isDebugEnabled()) {
  4. log.debug("{} cant empty and value is empty. ignore", name);
  5. return this;
  6. }
  7. }
  8. return addParameter(new BasicNameValuePair(name, value));
  9. }

代码示例来源:origin: top.wboost/common-web

  1. @Override
  2. public boolean checkParameter(Method domethod, Object[] args) {
  3. Annotation[][] paramsAnnotationsArray = domethod.getParameterAnnotations();
  4. for (int i = 0; i < paramsAnnotationsArray.length; i++) {
  5. Annotation[] paramAnnotationsArray = paramsAnnotationsArray[i];
  6. for (int j = 0; j < paramAnnotationsArray.length; j++) {
  7. Annotation paramAnnotation = paramAnnotationsArray[j];
  8. if (paramAnnotation.annotationType().isAnnotationPresent(ParameterConfig.class)) {
  9. ParameterConfigChecker checker = parameterConfigMap.get(paramAnnotation.annotationType());
  10. log.debug("get checker:{}", checker);
  11. if (checker == null) {
  12. throw new BusinessException();
  13. }
  14. if (!checker.check(args[i], paramAnnotation,
  15. parameterNameDiscoverer.getParameterNames(domethod)[i])) {
  16. return false;
  17. }
  18. }
  19. }
  20. }
  21. return true;
  22. }

代码示例来源:origin: top.wboost/common-web

  1. @SuppressWarnings("unchecked")
  2. public <T> T getRepository(Class<T> repositoryInterface, Object customImplementation) {
  3. ProxyFactory result = new ProxyFactory();
  4. T t = super.getRepository(repositoryInterface, customImplementation);
  5. if (Proxy.isProxyClass(t.getClass())) {
  6. log.debug("addAdvice for FieldsConvert");
  7. result.setTarget(t);
  8. result.addAdvice(new SetResultInterceptor(t));
  9. }
  10. return (T) result.getProxy(classLoader);
  11. }

代码示例来源:origin: top.wboost/common-web

  1. /**
  2. * 有查询结果(不为null且若为map或集合则需要size大于0)
  3. * @param object 待判断数据
  4. * @param businessCode 返回码
  5. */
  6. public static void hasRecord(Object object, int businessCode, String... promptMessage) {
  7. boolean result = true;
  8. if (object == null) {
  9. result = false;
  10. } else if (object instanceof Collection) {
  11. Collection<?> collection = (Collection<?>) object;
  12. if (CollectionUtil.isEmpty(collection)) {
  13. result = false;
  14. }
  15. } else if (object instanceof Map) {
  16. Map<?, ?> map = (Map<?, ?>) object;
  17. if (map.size() == 0) {
  18. result = false;
  19. }
  20. } else {
  21. log.debug("cant decide this param : {} ,return true", object);
  22. }
  23. if (!result) {
  24. throwBusinessException(businessCode, promptMessage);
  25. }
  26. }

代码示例来源:origin: top.wboost/common-web

  1. propertiesVal = PropertiesUtil.getProperty(nutNullEntry.getKey(), nutNullEntry.getValue());
  2. log.debug("find notNullMap properties : {} in {} , value is {}.", nutNullEntry.getKey(),
  3. nutNullEntry.getValue(), propertiesVal);
  4. if (StringUtil.notEmpty(propertiesVal)) {
  5. propertiesVal = PropertiesUtil.getProperty(canNullEntry.getKey(), canNullEntry.getValue());
  6. log.debug("find canNullMap properties : {} in {} , value is {}.", canNullEntry.getKey(),
  7. canNullEntry.getValue(), propertiesVal);
  8. if (propertiesVal == null) {

代码示例来源:origin: top.wboost/common-boost

  1. @Override
  2. @Explain(exceptionCode = 0, value = "boost")
  3. public ModelAndView handle(HttpServletRequest request, HttpServletResponse response) {
  4. if (log.isDebugEnabled()) {
  5. log.debug("boostHandler handle...");
  6. }
  7. return handleInternal(request, response);
  8. }

代码示例来源:origin: top.wboost/common-web

  1. /**
  2. * 方法执行之前
  3. * @param joinPoint 目标类连接点对象
  4. */
  5. @Before("explainParameterAspect()")
  6. public void beforeAop(JoinPoint joinPoint) {
  7. Object[] args = joinPoint.getArgs();
  8. MethodSignature methodSignature = ((MethodSignature) joinPoint.getSignature());
  9. Method domethod = methodSignature.getMethod();
  10. if (log.isDebugEnabled()) {
  11. log.debug("checkPatameter for {}", domethod);
  12. }
  13. manager.checkParameter(domethod, args);
  14. }

代码示例来源:origin: top.wboost/common-web

  1. /**
  2. * 有查询结果(不为null且若为map或集合则需要size大于0)
  3. * @param object 待判断数据
  4. */
  5. public static void hasRecord(Object object, String... promptMessage) {
  6. boolean result = true;
  7. if (object == null) {
  8. result = false;
  9. } else if (object instanceof Collection) {
  10. Collection<?> collection = (Collection<?>) object;
  11. if (CollectionUtil.isEmpty(collection)) {
  12. result = false;
  13. }
  14. } else if (object instanceof Map) {
  15. Map<?, ?> map = (Map<?, ?>) object;
  16. if (map.size() == 0) {
  17. result = false;
  18. }
  19. } else {
  20. log.debug("cant decide this param : {} ,return true", object);
  21. }
  22. if (!result) {
  23. throwBusinessException(SystemCode.NO_RECORD.getCode(), promptMessage);
  24. }
  25. }

代码示例来源:origin: top.wboost/common-web

  1. /**
  2. * 根据id修改单个属性
  3. * @date 2016年10月13日下午8:17:47
  4. * @param id
  5. * 修改资源id
  6. * @param key
  7. * 修改资源key
  8. * @param value
  9. * 修改资源value
  10. */
  11. public void updateById(ID id, Field key, Object value) {
  12. if (key == null) {
  13. throw new RuntimeException("NO FIELD!");
  14. }
  15. T t = getBaseRepository().getOne(id);
  16. if (t == null) {
  17. log.debug("method:updateById entity is undefined");
  18. return;
  19. }
  20. try {
  21. ReflectUtil.getWriteMethod(t.getClass(), key.getName()).invoke(t, value);
  22. getRepository().save(t);
  23. } catch (Exception e) {
  24. log.error(e.getMessage());
  25. }
  26. }

代码示例来源:origin: top.wboost/common-web

  1. /**
  2. * 根据id修改单个属性
  3. * @date 2016年10月13日下午8:17:47
  4. * @param id
  5. * 修改资源id
  6. * @param key
  7. * 修改资源key
  8. * @param value
  9. * 修改资源value
  10. */
  11. public void updateById(String id, Field key, Object value) {
  12. if (key == null) {
  13. throw new RuntimeException("NO FIELD!");
  14. }
  15. T t = getBaseRepository().getOne(id);
  16. if (t == null) {
  17. log.debug("method:updateById entity is undefined");
  18. return;
  19. }
  20. try {
  21. ReflectUtil.getWriteMethod(t.getClass(), key.getName()).invoke(t, value);
  22. getRepository().save(t);
  23. } catch (Exception e) {
  24. log.error(e.getMessage());
  25. }
  26. }

代码示例来源:origin: top.wboost/swagger-spring-boot-starter

  1. @Override
  2. public void apply(RequestMappingContext context) {
  3. List<ApiResponseDoc> annotations = context.findAnnotations(ApiResponseDoc.class);
  4. if (annotations != null && annotations.size() > 0) {
  5. ClassGeneratorEntity classGenerator = new ClassGeneratorEntity();
  6. try {
  7. if (!genMap.containsKey(annotations.get(0).value().getSimpleName())) {
  8. classGenerator.setName("ModelShow_" + annotations.get(0).value().getSimpleName());
  9. //classGenerator.setVisitClass(ResultEntityNoDataTemplate.class);
  10. classGenerator.addFieldGenerator(new ClassGeneratorEntity.FieldGenerator("data", annotations.get(0).value()));
  11. classGenerator.addFieldGenerator(new ClassGeneratorEntity.FieldGenerator("info", ResultEntityTemplate.ReturnInfoTemplate.class));
  12. classGenerator.addFieldGenerator(new ClassGeneratorEntity.FieldGenerator("status", Integer.class));
  13. classGenerator.addFieldGenerator(new ClassGeneratorEntity.FieldGenerator("validate", Boolean.class));
  14. Class<?> generatorClass = ClassGenerator.generatorClass(classGenerator);
  15. genMap.put(annotations.get(0).value().getSimpleName(), generatorClass);
  16. }
  17. ResolvedType modelType = context.alternateFor(typeResolver.resolve(genMap.get(annotations.get(0).value().getSimpleName())));
  18. logger.debug("Adding return parameter of type {}", resolvedTypeSignature(modelType).or("<null>"));
  19. context.operationModelsBuilder().addReturn(modelType);
  20. } catch (IOException e) {
  21. e.printStackTrace();
  22. throw new SystemCodeException(SystemCode.DO_FAIL,"ASM CREATE ERROR! " + JSONObject.toJSONString(classGenerator));
  23. }
  24. }
  25. }
  26. }

代码示例来源:origin: top.wboost/common-kylin

  1. /**
  2. * 根据cube名查询project
  3. * @param cubeName cube名
  4. * @return {@link top.wboost.common.kylin.entity.ProjectsReadable}
  5. */
  6. public static ProjectsReadable queryProjectByCubeName(String cubeName) {
  7. List<ProjectsReadable> projectsReadableList = KylinQueryUtil
  8. .queryList(KylinApi.createApiProjectsReadableSearch(), ProjectsReadable.class);
  9. Checker.hasRecord(projectsReadableList);
  10. for (ProjectsReadable projectsReadable : projectsReadableList) {
  11. List<Realizations> realizationsList = projectsReadable.getRealizations();
  12. if (!CollectionUtil.isEmpty(realizationsList)) {
  13. for (Realizations realizations : realizationsList) {
  14. if (realizations.getType().equals("CUBE") && realizations.getRealization().equals(cubeName)) {
  15. return projectsReadable;
  16. }
  17. }
  18. }
  19. }
  20. log.debug("not find project by cubeName : {}", cubeName);
  21. return null;
  22. }

代码示例来源:origin: top.wboost/common-kylin

  1. private static Object[] executeDistinctSelect(String projectName, String sql) {
  2. ApiSqlSearch sqlSearch = KylinApi.createApiSqlSearch(projectName, sql);
  3. log.debug("distinct sql:{}", sqlSearch.getSql());
  4. ApiSqlResultEntity result = KylinQueryUtil.queryByApiSql(sqlSearch);
  5. Object[] retArray = new Object[result.getResults().size()];
  6. for (int i = 0; i < retArray.length; i++) {
  7. JSONArray resultOne = (JSONArray) result.getResults().get(i);
  8. retArray[i] = resultOne.get(0);
  9. }
  10. return retArray;
  11. }

代码示例来源:origin: top.wboost/common-web

  1. @Override
  2. public Date convert(String source) {
  3. if (!StringUtil.notEmpty(source)) {
  4. return null;
  5. }
  6. if (StringUtil.getAllPatternMattcher(source, DateUtil.DATE.PATTERN_YYYY_MM_DD_HH_MM_SS, 0) != null) {
  7. return DateUtil.parse(source, DateUtil.DATE.YYYY_MM_DD_HH_MM_SS);
  8. }
  9. if (StringUtil.getAllPatternMattcher(source, DateUtil.DATE.PATTERN_YYYY_MM_DD_HH_MM, 0) != null) {
  10. return DateUtil.parse(source, DateUtil.DATE.YYYY_MM_DD_HH_MM);
  11. }
  12. if (StringUtil.getAllPatternMattcher(source, DateUtil.DATE.PATTERN_YYYY_MM_DD, 0) != null) {
  13. return DateUtil.parse(source, DateUtil.DATE.YYYY_MM_DD);
  14. }
  15. log.debug("cant convert :" + source);
  16. return null;
  17. }

相关文章