diff --git a/weed/filer/cassandra_store/cassandra_store.go b/weed/filer/cassandra_store/cassandra_store.go index 837fa48d3..023ce60eb 100644 --- a/weed/filer/cassandra_store/cassandra_store.go +++ b/weed/filer/cassandra_store/cassandra_store.go @@ -66,7 +66,7 @@ func (c *CassandraStore) Get(fullFileName string) (fid string, err error) { `select fids FROM seaweed_files WHERE path = ? LIMIT 1`, fullFileName).Consistency(gocql.One).Scan(&output); err != nil { if err != gocql.ErrNotFound { - glog.V(0).Infof("Failed to find file %s: %v", fullFileName, fid, err) + glog.V(0).Infof("Failed to find file %s: %v", fullFileName, err) return "", filer.ErrNotFound } } diff --git a/weed/filer/postgres_store/postgres_store.go b/weed/filer/postgres_store/postgres_store.go index 854793f6a..13c013299 100644 --- a/weed/filer/postgres_store/postgres_store.go +++ b/weed/filer/postgres_store/postgres_store.go @@ -119,7 +119,7 @@ func (s *PostgresStore) ListFiles(dirPath string, lastFileName string, limit int func (s *PostgresStore) DeleteDirectory(dirPath string, recursive bool) (err error) { err = s.deleteDirectory(dirPath, recursive) if err != nil { - glog.V(0).Infof("Error in Postgres DeleteDir '%s' (recursive = '%t'): %s", err) + glog.V(0).Infof("Error in Postgres DeleteDir '%s' (recursive = '%t'): %v", dirPath, recursive, err) } return err } diff --git a/weed/glide.lock b/weed/glide.lock index ad0e1bf8e..643b2efc9 100644 --- a/weed/glide.lock +++ b/weed/glide.lock @@ -1,8 +1,8 @@ -hash: bc35cb94b57f621923b87a4e71a0175425d1d2dad00fdd4d5ee35ab80cef1c60 -updated: 2018-04-16T00:58:48.978801-07:00 +hash: 2e3a065472829938d25e879451b6d1aa43e55270e1166a9c044803ef8a3b9eb1 +updated: 2018-06-28T23:52:52.92232-07:00 imports: - name: bazil.org/fuse - version: 371fbbdaa8987b715bdd21d6adc4c9b20155f748 + version: 65cc252bf6691cb3c7014bcb2c8dc29de91e3a7e subpackages: - fs - fuseutil @@ -15,9 +15,9 @@ imports: - name: github.com/dgrijalva/jwt-go version: 06ea1031745cb8b3dab3f6a236daf2b0aa468b7e - name: github.com/disintegration/imaging - version: fd34ef7671b12cdf1b024d98c6b327b2770d32c4 + version: bbcee2f5c9d5e94ca42c8b50ec847fec64a6c134 - name: github.com/go-redis/redis - version: 877867d2845fbaf86798befe410b6ceb6f5c29a3 + version: 83fb42932f6145ce52df09860384a4653d2d332a subpackages: - internal - internal/consistenthash @@ -27,19 +27,19 @@ imports: - internal/singleflight - internal/util - name: github.com/go-sql-driver/mysql - version: a0583e0143b1624142adab07e0e97fe106d99561 + version: d523deb1b23d913de5bdada721a6071e71283618 - name: github.com/gocql/gocql - version: 3540fc649cd7fc57cef5612b7bacac7a4fc443d6 + version: e06f8c1bcd787e6bf0608288b314522f08cc7848 subpackages: - internal/lru - internal/murmur - internal/streams - name: github.com/gogo/protobuf - version: 1ef32a8b9fc3f8ec940126907cedb5998f6318e4 + version: 30cf7ac33676b5786e78c746683f0d4cd64fa75b subpackages: - proto - name: github.com/golang/protobuf - version: 925541529c1fa6821df4e44ce2723319eb2be768 + version: b4deda0973fb4c70b50d226b1af49f3da59f5265 subpackages: - proto - protoc-gen-go/descriptor @@ -48,30 +48,32 @@ imports: - ptypes/duration - ptypes/timestamp - name: github.com/golang/snappy - version: 553a641470496b2327abcac10b36396bd98e45c9 + version: 2e65f85255dbc3072edf28d6b5b8efc472979f5a - name: github.com/google/btree version: e89373fe6b4a7413d7acd6da1725b83ef713e6e4 - name: github.com/gorilla/context version: 08b5f424b9271eedf6f9f0ce86cb9396ed337a42 - name: github.com/gorilla/mux - version: 53c1911da2b537f792e7cafcb446b05ffe33b996 + version: e3702bed27f0d39777b0b37b664b6280e8ef8fbf - name: github.com/hailocab/go-hostpool version: e80d13ce29ede4452c43dea11e79b9bc8a15b478 +- name: github.com/karlseguin/ccache + version: b425c9ca005a2050ebe723f6a0cddcb907354ab7 - name: github.com/klauspost/crc32 version: cb6bfca970f6908083f26f39a79009d608efd5cd - name: github.com/lib/pq - version: d34b9ff171c21ad295489235aec8b6626023cd04 + version: 90697d60dd844d5ef6ff15135d0203f65d2f53b8 subpackages: - oid - name: github.com/rwcarlsen/goexif - version: fb35d3c3290d09f3524b684b5d42d0063c227158 + version: 8d986c03457a2057c7b0fb0a48113f7dd48f9619 subpackages: - exif - tiff - name: github.com/soheilhy/cmux version: e09e9389d85d8492d313d73d1469c029e710623f - name: github.com/syndtr/goleveldb - version: 714f901b98fdb3aa954b4193d8cbd64a28d80cad + version: 0d5a0ceb10cf9ab89fdd744cc8c50a83134f6697 subpackages: - leveldb - leveldb/cache @@ -86,38 +88,42 @@ imports: - leveldb/table - leveldb/util - name: golang.org/x/image - version: f315e440302883054d0c2bd85486878cb4f8572c + version: cc896f830cedae125428bc9fe1b0362aa91b3fb1 subpackages: - bmp - tiff - tiff/lzw - name: golang.org/x/net - version: 500e7a4f953ddaf55d316b4d3adc516aa0379622 + version: 4cb1c02c05b0e749b0365f61ae859a8e0cfceed9 subpackages: - context + - http/httpguts - http2 - http2/hpack - idna - internal/timeseries - - lex/httplex - trace - name: golang.org/x/sys - version: 2281fa97ef7b0c26324634d5a22f04babdac8713 + version: 7138fd3d9dc8335c567ca206f4333fb75eb05d56 subpackages: - unix - name: golang.org/x/text - version: 7922cc490dd5a7dbaa7fd5d6196b49db59ac042f + version: 5cec4b58c438bd98288aeb248bab2c1840713d21 subpackages: - secure/bidirule - transform - unicode/bidi - unicode/norm +- name: google.golang.org/appengine + version: b1f26356af11148e710935ed1ac8a7f5702c7612 + subpackages: + - cloudsql - name: google.golang.org/genproto - version: 7fd901a49ba6a7f87732eb344f6e3c5b19d1b200 + version: ff3583edef7de132f219f0efc00e097cabcc0ec0 subpackages: - googleapis/rpc/status - name: google.golang.org/grpc - version: d11072e7ca9811b1100b80ca0269ac831f06d024 + version: 168a6198bcb0ef175f7dacec0b8691fc141dc9b8 subpackages: - balancer - balancer/base @@ -127,9 +133,11 @@ imports: - credentials - encoding - encoding/proto - - grpclb/grpc_lb_v1/messages - grpclog - internal + - internal/backoff + - internal/channelz + - internal/grpcrand - keepalive - metadata - naming diff --git a/weed/server/common.go b/weed/server/common.go index 20177df0e..c79dc0de1 100644 --- a/weed/server/common.go +++ b/weed/server/common.go @@ -74,7 +74,7 @@ func writeJsonError(w http.ResponseWriter, r *http.Request, httpStatus int, err } func debug(params ...interface{}) { - glog.V(4).Infoln(params) + glog.V(4).Infoln(params...) } func submitForClientHandler(w http.ResponseWriter, r *http.Request, masterUrl string) { diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.go index e95c7fcd0..be08fe863 100644 --- a/weed/server/filer_server_handlers_read.go +++ b/weed/server/filer_server_handlers_read.go @@ -101,7 +101,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request, urlLocation, err := operation.LookupFileId(fs.getMasterNode(), fileId) if err != nil { - glog.V(1).Infoln("operation LookupFileId %s failed, err is %s", fileId, err.Error()) + glog.V(1).Infof("operation LookupFileId %s failed, err:%v", fileId, err) w.WriteHeader(http.StatusNotFound) return } diff --git a/weed/server/filer_server_handlers_write.go b/weed/server/filer_server_handlers_write.go index 07452cd77..b7efa440a 100644 --- a/weed/server/filer_server_handlers_write.go +++ b/weed/server/filer_server_handlers_write.go @@ -79,7 +79,7 @@ func (fs *FilerServer) queryFileInfoByPath(w http.ResponseWriter, r *http.Reques } else if fileId != "" && err == nil { urlLocation, err = operation.LookupFileId(fs.getMasterNode(), fileId) if err != nil { - glog.V(1).Infoln("operation LookupFileId %s failed, err is %s", fileId, err.Error()) + glog.V(1).Infof("operation LookupFileId %s failed, err:%s", fileId, err) w.WriteHeader(http.StatusNotFound) } } else if fileId == "" && err == filer.ErrNotFound { @@ -193,7 +193,7 @@ func (fs *FilerServer) monolithicUploadAnalyzer(w http.ResponseWriter, r *http.R */ lastPos := strings.LastIndex(r.URL.Path, "/") if lastPos == -1 || lastPos == 0 || lastPos == len(r.URL.Path)-1 { - glog.V(0).Infoln("URL Path [%s] is invalid, could not retrieve file name", r.URL.Path) + glog.V(0).Infof("URL Path [%s] is invalid, could not retrieve file name", r.URL.Path) err = fmt.Errorf("URL Path is invalid") writeJsonError(w, r, http.StatusInternalServerError, err) return diff --git a/weed/server/volume_server_handlers_admin.go b/weed/server/volume_server_handlers_admin.go index 79bb89756..fdfb6de5f 100644 --- a/weed/server/volume_server_handlers_admin.go +++ b/weed/server/volume_server_handlers_admin.go @@ -25,7 +25,7 @@ func (vs *VolumeServer) assignVolumeHandler(w http.ResponseWriter, r *http.Reque if r.FormValue("preallocate") != "" { preallocate, err = strconv.ParseInt(r.FormValue("preallocate"), 10, 64) if err != nil { - glog.V(0).Infoln("ignoring invalid int64 value for preallocate = %v", r.FormValue("preallocate")) + glog.V(0).Infof("ignoring invalid int64 value for preallocate = %v", r.FormValue("preallocate")) } } err = vs.store.AddVolume( @@ -41,7 +41,7 @@ func (vs *VolumeServer) assignVolumeHandler(w http.ResponseWriter, r *http.Reque } else { writeJsonError(w, r, http.StatusNotAcceptable, err) } - glog.V(2).Infoln("assign volume = %s, collection = %s , replication = %s, error = %v", + glog.V(2).Infof("assign volume = %s, collection = %s , replication = %s, error = %v", r.FormValue("volume"), r.FormValue("collection"), r.FormValue("replication"), err) } diff --git a/weed/server/volume_server_handlers_vacuum.go b/weed/server/volume_server_handlers_vacuum.go index d50eba031..b45e97a50 100644 --- a/weed/server/volume_server_handlers_vacuum.go +++ b/weed/server/volume_server_handlers_vacuum.go @@ -22,7 +22,7 @@ func (vs *VolumeServer) vacuumVolumeCompactHandler(w http.ResponseWriter, r *htt if r.FormValue("preallocate") != "" { preallocate, err = strconv.ParseInt(r.FormValue("preallocate"), 10, 64) if err != nil { - glog.V(0).Infoln("Failed to parse int64 preallocate = %s: %v", r.FormValue("preallocate"), err) + glog.V(0).Infof("Failed to parse int64 preallocate = %s: %v", r.FormValue("preallocate"), err) } } err = vs.store.CompactVolume(r.FormValue("volume"), preallocate)