diff options
Diffstat (limited to 'weed/security')
| -rw-r--r-- | weed/security/guard.go | 4 | ||||
| -rw-r--r-- | weed/security/jwt.go | 4 | ||||
| -rw-r--r-- | weed/security/tls.go | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/weed/security/guard.go b/weed/security/guard.go index 87ec91ec1..0b116e530 100644 --- a/weed/security/guard.go +++ b/weed/security/guard.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util/log" ) var ( @@ -122,6 +122,6 @@ func (g *Guard) checkWhiteList(w http.ResponseWriter, r *http.Request) error { } } - glog.V(0).Infof("Not in whitelist: %s", r.RemoteAddr) + log.Infof("Not in whitelist: %s", r.RemoteAddr) return fmt.Errorf("Not in whitelis: %s", r.RemoteAddr) } diff --git a/weed/security/jwt.go b/weed/security/jwt.go index 0bd7fa974..36d8e10f2 100644 --- a/weed/security/jwt.go +++ b/weed/security/jwt.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util/log" jwt "github.com/dgrijalva/jwt-go" ) @@ -33,7 +33,7 @@ func GenJwt(signingKey SigningKey, expiresAfterSec int, fileId string) EncodedJw t := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) encoded, e := t.SignedString([]byte(signingKey)) if e != nil { - glog.V(0).Infof("Failed to sign claims %+v: %v", t.Claims, e) + log.Infof("Failed to sign claims %+v: %v", t.Claims, e) return "" } return EncodedJwt(encoded) diff --git a/weed/security/tls.go b/weed/security/tls.go index 5821b159d..53816f256 100644 --- a/weed/security/tls.go +++ b/weed/security/tls.go @@ -10,7 +10,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util/log" ) func LoadServerTLS(config *viper.Viper, component string) grpc.ServerOption { @@ -21,12 +21,12 @@ func LoadServerTLS(config *viper.Viper, component string) grpc.ServerOption { // load cert/key, ca cert cert, err := tls.LoadX509KeyPair(config.GetString(component+".cert"), config.GetString(component+".key")) if err != nil { - glog.V(1).Infof("load cert/key error: %v", err) + log.Debugf("load cert/key error: %v", err) return nil } caCert, err := ioutil.ReadFile(config.GetString(component + ".ca")) if err != nil { - glog.V(1).Infof("read ca cert file error: %v", err) + log.Debugf("read ca cert file error: %v", err) return nil } caCertPool := x509.NewCertPool() @@ -53,12 +53,12 @@ func LoadClientTLS(config *viper.Viper, component string) grpc.DialOption { // load cert/key, cacert cert, err := tls.LoadX509KeyPair(certFileName, keyFileName) if err != nil { - glog.V(1).Infof("load cert/key error: %v", err) + log.Debugf("load cert/key error: %v", err) return grpc.WithInsecure() } caCert, err := ioutil.ReadFile(caFileName) if err != nil { - glog.V(1).Infof("read ca cert file error: %v", err) + log.Debugf("read ca cert file error: %v", err) return grpc.WithInsecure() } caCertPool := x509.NewCertPool() |
