Browse Source

打印失败日志

dengsixing 3 years ago
parent
commit
d8188c9b9d

+ 5 - 0
4dkankan-center-scene-download/src/main/java/com/fdkankan/download/service/impl/SceneDownloadHandlerServiceImpl.java

@@ -243,6 +243,7 @@ public class SceneDownloadHandlerServiceImpl {
             // TODO: 2022/5/24 v3 停止后要开启-----------------------end
 
         }catch (Exception e){
+            log.error("下载失败,num={}", num);
             //更新进度为下载失败
             this.updateProgress( null, num, SceneDownloadProgressStatus.DOWNLOAD_FAILED.code(), null);
             //更新下载log状态为成功
@@ -492,6 +493,7 @@ public class SceneDownloadHandlerServiceImpl {
                 precent = new BigDecimal("100");
                 break;
             case DOWNLOAD_FAILED:
+                log.info("失败了啊-------------------------------");
                 precent = new BigDecimal("0");
                 break;
             default:
@@ -527,6 +529,9 @@ public class SceneDownloadHandlerServiceImpl {
     }
 
     public synchronized void zipBytes(ZipOutputStream out, String key, byte[] bytes) throws Exception {
+        if(Objects.isNull(bytes)){
+            log.error("获取oss字节数组为空,key={}",key);
+        }
         out.putNextEntry(new org.apache.tools.zip.ZipEntry(key));
         out.write(bytes);
     }