Skip to content

Commit

Permalink
Adjust log verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
yugui committed May 4, 2015
1 parent 17fee9f commit 593bfcc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions protoc-gen-grpc-gateway/descriptor/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (r *Registry) registerMsg(file *File, outerPath []string, msgs []*descripto
}
file.Messages = append(file.Messages, m)
r.msgs[m.FQMN()] = m
glog.Infof("register name: %s", m.FQMN())
glog.V(1).Infof("register name: %s", m.FQMN())

var outers []string
outers = append(outers, outerPath...)
Expand All @@ -105,7 +105,7 @@ func (r *Registry) registerMsg(file *File, outerPath []string, msgs []*descripto
// LookupMsg looks up a message type by "name".
// It tries to resolve "name" from "location" if "name" is a relative message name.
func (r *Registry) LookupMsg(location, name string) (*Message, error) {
glog.Infof("lookup %s from %s", name, location)
glog.V(1).Infof("lookup %s from %s", name, location)
if strings.HasPrefix(name, ".") {
m, ok := r.msgs[name]
if !ok {
Expand Down
2 changes: 1 addition & 1 deletion protoc-gen-grpc-gateway/descriptor/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (r *Registry) resolveFiledPath(msg *Message, path string) ([]FieldPathCompo
}
}

glog.Infof("Lookup %s in %s", c, msg.FQMN())
glog.V(2).Infof("Lookup %s in %s", c, msg.FQMN())
f := lookupField(msg, c)
if f == nil {
return nil, fmt.Errorf("no field %q found in %s", path, root.GetName())
Expand Down
2 changes: 1 addition & 1 deletion protoc-gen-grpc-gateway/gengateway/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (g *generator) Generate(targets []*descriptor.File) ([]*plugin.CodeGenerato
Name: proto.String(output),
Content: proto.String(string(formatted)),
})
glog.Infof("Will emit %s", output)
glog.V(1).Infof("Will emit %s", output)
}
return files, nil
}
Expand Down
4 changes: 2 additions & 2 deletions protoc-gen-grpc-gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func main() {

reg := descriptor.NewRegistry()

glog.Info("Processing code generator request")
glog.V(1).Info("Processing code generator request")
req, err := parseReq(os.Stdin)
if err != nil {
glog.Fatal(err)
Expand Down Expand Up @@ -86,7 +86,7 @@ func main() {
} else {
resp.File = out
}
glog.Info("Processed code generator request")
glog.V(1).Info("Processed code generator request")

buf, err := proto.Marshal(&resp)
if err != nil {
Expand Down

0 comments on commit 593bfcc

Please sign in to comment.