Browse Source

better log messages

git-svn-id: https://weed-fs.googlecode.com/svn/trunk@28 282b0af5-e82d-9cf1-ede4-77906d7719d0
pull/2/head
chris.lu@gmail.com 13 years ago
parent
commit
3c98f1a119
  1. 2
      weed-fs/src/cmd/weedc.go
  2. 3
      weed-fs/src/pkg/storage/store.go

2
weed-fs/src/cmd/weedc.go

@ -141,7 +141,7 @@ func main() {
}() }()
log.Println("store joined at", *metaServer) log.Println("store joined at", *metaServer)
log.Println("Start storage service at http://127.0.0.1:" + strconv.Itoa(*port))
log.Println("Start storage service at http://127.0.0.1:" + strconv.Itoa(*port), "public url", *publicUrl)
e := http.ListenAndServe(":"+strconv.Itoa(*port), nil) e := http.ListenAndServe(":"+strconv.Itoa(*port), nil)
if e != nil { if e != nil {
log.Fatalf("Fail to start:", e.String()) log.Fatalf("Fail to start:", e.String())

3
weed-fs/src/pkg/storage/store.go

@ -51,7 +51,7 @@ func NewStore(port int, publicUrl, dirname string, volumeListString string) (s *
} }
} }
} }
log.Println("Store started on dir:", dirname, "with", len(s.volumes), "existing volumes")
log.Println("Store started on dir:", dirname, "with", len(s.volumes), "volumes")
return return
} }
@ -76,7 +76,6 @@ func (s *Store) Join(mserver string) {
values.Add("port", strconv.Itoa(s.Port)) values.Add("port", strconv.Itoa(s.Port))
values.Add("publicUrl", s.PublicUrl) values.Add("publicUrl", s.PublicUrl)
values.Add("volumes", string(bytes)) values.Add("volumes", string(bytes))
log.Println("Exiting volumes", string(bytes))
util.Post("http://"+mserver+"/dir/join", values) util.Post("http://"+mserver+"/dir/join", values)
} }
func (s *Store) Close() { func (s *Store) Close() {

Loading…
Cancel
Save