switching to temporarily use glog library

This commit is contained in:
Chris Lu
2013-08-08 23:57:22 -07:00
parent b27947b355
commit ed154053c8
34 changed files with 199 additions and 167 deletions

View File

@@ -5,7 +5,7 @@ import (
"bytes"
"code.google.com/p/weed-fs/go/storage"
"fmt"
"log"
"code.google.com/p/weed-fs/go/glog"
"os"
"path"
"strconv"
@@ -67,7 +67,7 @@ func runExport(cmd *Command, args []string) bool {
fh = os.Stdout
} else {
if fh, err = os.Create(*dest); err != nil {
log.Fatalf("cannot open output tar %s: %s", *dest, err)
glog.Fatalf("cannot open output tar %s: %s", *dest, err)
}
}
defer fh.Close()
@@ -84,13 +84,13 @@ func runExport(cmd *Command, args []string) bool {
vid := storage.VolumeId(*exportVolumeId)
indexFile, err := os.OpenFile(path.Join(*exportVolumePath, fileName+".idx"), os.O_RDONLY, 0644)
if err != nil {
log.Fatalf("Create Volume Index [ERROR] %s\n", err)
glog.Fatalf("Create Volume Index [ERROR] %s\n", err)
}
defer indexFile.Close()
nm, err := storage.LoadNeedleMap(indexFile)
if err != nil {
log.Fatalf("cannot load needle map from %s: %s", indexFile, err)
glog.Fatalf("cannot load needle map from %s: %s", indexFile, err)
}
var version storage.Version
@@ -113,7 +113,7 @@ func runExport(cmd *Command, args []string) bool {
return nil
})
if err != nil {
log.Fatalf("Export Volume File [ERROR] %s\n", err)
glog.Fatalf("Export Volume File [ERROR] %s\n", err)
}
return true
}