Documentation ¶
Index ¶
- Constants
- func ContextWithLogger(ctx context.Context) context.Context
- func Debug(msg string, c Content)
- func Error(msg string, c Content)
- func Fatal(msg string, c Content)
- func Info(msg string, c Content)
- func RegisterImplementor(log Logger)
- func StreamServerInterceptor() grpc.StreamServerInterceptor
- func UnaryServerInterceptor() grpc.UnaryServerInterceptor
- func Warn(msg string, c Content)
- type Content
- type Helper
- type Level
- type Logger
Constants ¶
View Source
const ( LogTag = "_BASE_." AccessLog = "_MSG_.access" ErrorLog = "_MSG_.error" UpstreamLog = "_MSG_.upstream" DownstreamLog = "_MSG_.downstream" StreamingLog = "_MSG_.streaming" Consumed = "consumed" LogConsumed = LogTag + Consumed LogPath = LogTag + "path" LogRequest = LogTag + "request" LogResponse = LogTag + "response" LogUpstream = LogTag + "upstream" LogDownstream = LogTag + "downstream" LogSecret = LogTag + "secret" LogError = LogTag + "error" )
Variables ¶
This section is empty.
Functions ¶
func RegisterImplementor ¶
func RegisterImplementor(log Logger)
RegisterImplementor registers the logger service implementor.
func StreamServerInterceptor ¶
func StreamServerInterceptor() grpc.StreamServerInterceptor
StreamServerInterceptor returns a new streaming server interceptor for access log.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a new unary server interceptor for access log.
Types ¶
type Helper ¶
type Helper struct { Logger // contains filtered or unexported fields }
func ContextLogger ¶
Click to show internal directories.
Click to hide internal directories.