Documentation
¶
Index ¶
- func Errorf(ctx context.Context, format string, args ...interface{})
- func Infof(level glog.Level, ctx context.Context, format string, args ...interface{})
- func InitTracer(component string) (closer io.Closer, err error)
- func LogGRPCClient(ctx context.Context, method string, req, reply interface{}, ...) error
- func LogGRPCServer(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errorf ¶
Errorf does the same as Infof for error messages, except that it ignores the current log level.
func Infof ¶
Infof logs with glog.V(level).Infof() and in addition, always adds a log message to the current tracing span if the context has one. This ensures that spans which get recorded (not all do) have the full information.
func InitTracer ¶
InitTracer initializes the global OpenTracing tracer, using Jaeger and the provided name for the current process. Must be called at the start of main(). The result is a function which should be called at the end of main() to clean up.
func LogGRPCClient ¶
func LogGRPCClient(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
LogGRPCClient does the same as LogGRPCServer, only on the client side.
func LogGRPCServer ¶
func LogGRPCServer(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
LogGRPCServer logs the server-side call information via glog.
Warning: at log levels >= 5 the recorded information includes all parameters, which potentially contains sensitive information like the secrets.
Types ¶
This section is empty.