Browse Source

将fmt的打印全部替换成log.Info

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.21.12.1
zouap 4 years ago
parent
commit
aa6e497bd3
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      routers/repo/dir.go

+ 3
- 4
routers/repo/dir.go View File

@@ -3,7 +3,6 @@ package repo
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
"path"
@@ -90,7 +89,7 @@ func DeleteAllUnzipFile(attachment *models.Attachment, parentDir string) {
for {
output, err := storage.ObsCli.ListObjects(input)
if err == nil {
fmt.Printf("Page:%d\n", index)
log.Info("Page:%d\n", index)
index++
for _, val := range output.Contents {
log.Info("delete obs file:" + val.Key)
@@ -106,8 +105,8 @@ func DeleteAllUnzipFile(attachment *models.Attachment, parentDir string) {
}
} else {
if obsError, ok := err.(obs.ObsError); ok {
fmt.Printf("Code:%s\n", obsError.Code)
fmt.Printf("Message:%s\n", obsError.Message)
log.Info("Code:%s\n", obsError.Code)
log.Info("Message:%s\n", obsError.Message)
}
break
}


Loading…
Cancel
Save