| | |
| | | * @param logParentPath |
| | | * @return |
| | | */ |
| | | //@Override |
| | | @Override |
| | | public List<LocalLogVO> getSystemLogList(String logParentPath) { |
| | | List<LocalLogVO> localLogsVO = new ArrayList<>(); |
| | | // 不为空说明是加载当前这个服务路径下的日志文件 |
| | |
| | | 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(); |
| | |
| | | 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; |
| | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | return localLogsVO; |
| | | } |
| | | |