mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	Silence glog crap
This commit is contained in:
		| @@ -14,8 +14,13 @@ import ( | ||||
| 	opentracing "github.com/opentracing/opentracing-go" | ||||
| 	"google.golang.org/grpc" | ||||
| 	"google.golang.org/grpc/credentials" | ||||
| 	"google.golang.org/grpc/grpclog" | ||||
| ) | ||||
|  | ||||
| func init() { | ||||
| 	grpclog.SetLogger(discard{}) | ||||
| } | ||||
|  | ||||
| type grpcClient struct { | ||||
| 	dialOpts []grpc.DialOption | ||||
| 	clients  map[string]pb.DnsServiceClient | ||||
| @@ -92,3 +97,13 @@ func (g *grpcClient) OnStartup(p *Proxy) error { | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| // discard is a Logger that outputs nothing. | ||||
| type discard struct{} | ||||
|  | ||||
| func (d discard) Fatal(args ...interface{})                 {} | ||||
| func (d discard) Fatalf(format string, args ...interface{}) {} | ||||
| func (d discard) Fatalln(args ...interface{})               {} | ||||
| func (d discard) Print(args ...interface{})                 {} | ||||
| func (d discard) Printf(format string, args ...interface{}) {} | ||||
| func (d discard) Println(args ...interface{})               {} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user