Browse Source

error log format

pull/800/head
Chris Lu 6 years ago
parent
commit
93d0ad09af
  1. 2
      weed/command/filer.go
  2. 2
      weed/command/server.go
  3. 2
      weed/command/volume.go
  4. 2
      weed/server/common.go

2
weed/command/filer.go

@ -126,7 +126,7 @@ func (fo *FilerOptions) startFiler() {
}() }()
} }
glog.V(0).Infoln("Start Seaweed Filer", util.VERSION, "at port", strconv.Itoa(*fo.port))
glog.V(0).Infof("Start Seaweed Filer %s at %s:%d", util.VERSION, *fo.ip, *fo.port)
filerListener, e := util.NewListener( filerListener, e := util.NewListener(
":"+strconv.Itoa(*fo.port), ":"+strconv.Itoa(*fo.port),
time.Duration(10)*time.Second, time.Duration(10)*time.Second,

2
weed/command/server.go

@ -173,7 +173,7 @@ func runServer(cmd *Command, args []string) bool {
serverWhiteList, *serverSecureKey, serverWhiteList, *serverSecureKey,
) )
glog.V(0).Infoln("Start Seaweed Master", util.VERSION, "at", *serverIp+":"+strconv.Itoa(*masterPort))
glog.V(0).Infof("Start Seaweed Master %s at %s:%d", util.VERSION, *serverIp, *masterPort)
masterListener, e := util.NewListener(*serverBindIp+":"+strconv.Itoa(*masterPort), 0) masterListener, e := util.NewListener(*serverBindIp+":"+strconv.Itoa(*masterPort), 0)
if e != nil { if e != nil {
glog.Fatalf("Master startup error: %v", e) glog.Fatalf("Master startup error: %v", e)

2
weed/command/volume.go

@ -155,7 +155,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
) )
listeningAddress := *v.bindIp + ":" + strconv.Itoa(*v.port) listeningAddress := *v.bindIp + ":" + strconv.Itoa(*v.port)
glog.V(0).Infoln("Start Seaweed volume server", util.VERSION, "at", listeningAddress)
glog.V(0).Infof("Start Seaweed volume server %s at %s", util.VERSION, listeningAddress)
listener, e := util.NewListener(listeningAddress, time.Duration(*v.idleConnectionTimeout)*time.Second) listener, e := util.NewListener(listeningAddress, time.Duration(*v.idleConnectionTimeout)*time.Second)
if e != nil { if e != nil {
glog.Fatalf("Volume server listener error:%v", e) glog.Fatalf("Volume server listener error:%v", e)

2
weed/server/common.go

@ -69,7 +69,7 @@ func writeJson(w http.ResponseWriter, r *http.Request, httpStatus int, obj inter
// wrapper for writeJson - just logs errors // wrapper for writeJson - just logs errors
func writeJsonQuiet(w http.ResponseWriter, r *http.Request, httpStatus int, obj interface{}) { func writeJsonQuiet(w http.ResponseWriter, r *http.Request, httpStatus int, obj interface{}) {
if err := writeJson(w, r, httpStatus, obj); err != nil { if err := writeJson(w, r, httpStatus, obj); err != nil {
glog.V(0).Infof("error writing JSON %s: %v", obj, err)
glog.V(0).Infof("error writing JSON %s status %d: %v", obj, httpStatus, err)
} }
} }
func writeJsonError(w http.ResponseWriter, r *http.Request, httpStatus int, err error) { func writeJsonError(w http.ResponseWriter, r *http.Request, httpStatus int, err error) {

Loading…
Cancel
Save