yuxc
2023-12-04 d74e1672af99afd7e6a24327deb22b308dd5fc88
Source/UBCS/ubcs-ops/ubcs-log/src/main/java/com/vci/ubcs/log/service/impl/LogLocalServiceImpl.java
@@ -82,7 +82,7 @@
    * @param logParentPath
    * @return
    */
   //@Override
   @Override
   public List<LocalLogVO> getSystemLogList(String logParentPath) {
      List<LocalLogVO> localLogsVO = new ArrayList<>();
      // 不为空说明是加载当前这个服务路径下的日志文件
@@ -90,6 +90,7 @@
         File file = new File(logParentPath);
         if (file.isDirectory()) {
            File[] files = file.listFiles();
            if(Func.isNotEmpty(files) && files.length>0){
            Arrays.stream(files).forEach(item->{
               // 组建日志文件对象
               LocalLogVO localLog = new LocalLogVO();
@@ -105,9 +106,11 @@
               localLogsVO.add(localLog);
            });
         }
         }
      }else {
         File fileDir = new File(PARENTPATH);
         File[] childDir = fileDir.listFiles();
         if(Func.isNotEmpty(childDir) && childDir.length > 0){
         Arrays.stream(childDir).forEach(dir->{
            if(dir.getName().contains("ubcs_")){
               String fullPath = dir.getPath() + LOGPATH;
@@ -129,6 +132,7 @@
            }
         });
      }
      }
      return localLogsVO;
   }