Documentation ¶
Index ¶
- func Ctx(ctx context.Context, info *grpc.UnaryServerInfo, code codes.Code) zapcore.Field
- func Init(opts Opts) (logger *zap.Logger, err error)
- func NewStackdriverConfig() zap.Config
- func NewStackdriverEncoderConfig() zapcore.EncoderConfig
- type Context
- type Encoder
- type HTTPRequest
- type Opts
- type ServiceContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStackdriverConfig ¶ added in v0.10.3
NewStackdriverConfig ...
func NewStackdriverEncoderConfig ¶ added in v0.10.3
func NewStackdriverEncoderConfig() zapcore.EncoderConfig
Types ¶
type Context ¶ added in v0.10.3
type Context struct { HTTPRequest HTTPRequest User string // contains filtered or unexported fields }
func (Context) MarshalLogObject ¶ added in v0.10.3
func (c Context) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject implements zapcore ObjectMarshaler.
type HTTPRequest ¶ added in v0.10.3
type HTTPRequest struct { Method string `json:"method"` URL string `json:"url"` UserAgent string `json:"userAgent"` Referrer string `json:"referrer"` ResponseStatusCode string `json:"responseStatusCode"` RemoteIP string `json:"remoteIp"` }
func (HTTPRequest) MarshalLogObject ¶ added in v0.10.3
func (hr HTTPRequest) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject implements zapcore ObjectMarshaler.
type ServiceContext ¶ added in v0.10.3
func (ServiceContext) MarshalLogObject ¶ added in v0.10.3
func (sc ServiceContext) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject implements zapcore ObjectMarshaler.
Click to show internal directories.
Click to hide internal directories.