Source File
grpclog.go
Belonging Package
google.golang.org/grpc/grpclog
/*
*
* Copyright 2017 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
// Package grpclog defines logging for grpc.
//
// All logs in transport and grpclb packages only go to verbose level 2.
// All logs in other packages in grpc are logged in spite of the verbosity level.
//
// In the default logger,
// severity level can be set by environment variable GRPC_GO_LOG_SEVERITY_LEVEL,
// verbosity level can be set by GRPC_GO_LOG_VERBOSITY_LEVEL.
package grpclog // import "google.golang.org/grpc/grpclog"
import (
)
func () {
SetLoggerV2(newLoggerV2())
}
// V reports whether verbosity level l is at least the requested verbose level.
func ( int) bool {
return grpclog.Logger.V()
}
// Info logs to the INFO log.
func ( ...interface{}) {
grpclog.Logger.Info(...)
}
// Infof logs to the INFO log. Arguments are handled in the manner of fmt.Printf.
func ( string, ...interface{}) {
grpclog.Logger.Infof(, ...)
}
// Infoln logs to the INFO log. Arguments are handled in the manner of fmt.Println.
func ( ...interface{}) {
grpclog.Logger.Infoln(...)
}
// Warning logs to the WARNING log.
func ( ...interface{}) {
grpclog.Logger.Warning(...)
}
// Warningf logs to the WARNING log. Arguments are handled in the manner of fmt.Printf.
func ( string, ...interface{}) {
grpclog.Logger.Warningf(, ...)
}
// Warningln logs to the WARNING log. Arguments are handled in the manner of fmt.Println.
func ( ...interface{}) {
grpclog.Logger.Warningln(...)
}
// Error logs to the ERROR log.
func ( ...interface{}) {
grpclog.Logger.Error(...)
}
// Errorf logs to the ERROR log. Arguments are handled in the manner of fmt.Printf.
func ( string, ...interface{}) {
grpclog.Logger.Errorf(, ...)
}
// Errorln logs to the ERROR log. Arguments are handled in the manner of fmt.Println.
func ( ...interface{}) {
grpclog.Logger.Errorln(...)
}
// Fatal logs to the FATAL log. Arguments are handled in the manner of fmt.Print.
// It calls os.Exit() with exit code 1.
func ( ...interface{}) {
grpclog.Logger.Fatal(...)
// Make sure fatal logs will exit.
os.Exit(1)
}
// Fatalf logs to the FATAL log. Arguments are handled in the manner of fmt.Printf.
// It calls os.Exit() with exit code 1.
func ( string, ...interface{}) {
grpclog.Logger.Fatalf(, ...)
// Make sure fatal logs will exit.
os.Exit(1)
}
// Fatalln logs to the FATAL log. Arguments are handled in the manner of fmt.Println.
// It calle os.Exit()) with exit code 1.
func ( ...interface{}) {
grpclog.Logger.Fatalln(...)
// Make sure fatal logs will exit.
os.Exit(1)
}
// Print prints to the logger. Arguments are handled in the manner of fmt.Print.
//
// Deprecated: use Info.
func ( ...interface{}) {
grpclog.Logger.Info(...)
}
// Printf prints to the logger. Arguments are handled in the manner of fmt.Printf.
//
// Deprecated: use Infof.
func ( string, ...interface{}) {
grpclog.Logger.Infof(, ...)
}
// Println prints to the logger. Arguments are handled in the manner of fmt.Println.
//
// Deprecated: use Infoln.
func ( ...interface{}) {
grpclog.Logger.Infoln(...)
}
The pages are generated with Golds v0.4.9. (GOOS=linux GOARCH=amd64)