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

@@ -3,7 +3,7 @@ package main
import (
"bufio"
"fmt"
"log"
"code.google.com/p/weed-fs/go/glog"
"os"
)
@@ -28,10 +28,10 @@ func runShell(command *Command, args []string) bool {
prompt := func() {
var err error
if _, err = o.WriteString("> "); err != nil {
log.Printf("error writing to stdout: %s", err)
glog.V(0).Infoln("error writing to stdout:", err)
}
if err = o.Flush(); err != nil {
log.Printf("error flushing stdout: %s", err)
glog.V(0).Infoln("error flushing stdout:", err)
}
}
readLine := func() string {
@@ -45,7 +45,7 @@ func runShell(command *Command, args []string) bool {
execCmd := func(cmd string) int {
if cmd != "" {
if _, err := o.WriteString(cmd); err != nil {
log.Printf("error writing to stdout: %s", err)
glog.V(0).Infoln("error writing to stdout:", err)
}
}
return 0