Documentation ¶
Index ¶
- Constants
- Variables
- func AnyCropped(key string, value interface{}) zap.Field
- func NewRedactor() *redactor
- func SetLoggerMode(envStr string)
- type AppEnv
- type INodePing
- type NodePing
- type Zaplog
- func (z *Zaplog) DebugErr(e error, fields ...zapcore.Field) *Zaplog
- func (z *Zaplog) DebugRedact(s string, fields ...zapcore.Field) *Zaplog
- func (z *Zaplog) ErrorErr(e error, fields ...zapcore.Field) *Zaplog
- func (z *Zaplog) ErrorRedact(s string, fields ...zapcore.Field) *Zaplog
- func (z *Zaplog) FatalRedact(s string, fields ...zapcore.Field) *Zaplog
- func (z *Zaplog) InfoErr(e error, fields ...zapcore.Field) *Zaplog
- func (z *Zaplog) InfoRedact(s string, fields ...zapcore.Field) *Zaplog
- func (z *Zaplog) PanicErr(e error, fields ...zapcore.Field) *Zaplog
- func (z *Zaplog) PanicRedact(s string, fields ...zapcore.Field) *Zaplog
- func (r Zaplog) Redact(message string) string
- func (z *Zaplog) WarnErr(e error, fields ...zapcore.Field) *Zaplog
- func (z *Zaplog) WarnRedact(s string, fields ...zapcore.Field) *Zaplog
- func (z *Zaplog) With(fields ...zapcore.Field) *Zaplog
Constants ¶
View Source
const MaxAttributeChars = 200
Variables ¶
View Source
var Envs = [...]string{ Production: "prod", Development: "dev", Local: "local", }
Functions ¶
func AnyCropped ¶ added in v0.0.7
AnyCropped takes a key and an arbitrary value and chooses the best way to represent them as a field. It crops the content if it is larger than 200 characters.
func NewRedactor ¶ added in v0.0.5
func NewRedactor() *redactor
func SetLoggerMode ¶
func SetLoggerMode(envStr string)
SetLoggerMode set Logger level from given string
Types ¶
type NodePing ¶ added in v0.0.8
type NodePing struct{}
func (*NodePing) LogNodeRequestHandled ¶ added in v0.0.8
func (n *NodePing) LogNodeRequestHandled(ctx context.Context, isHealthCheck bool, bc, id, addr string)
LogNodeRequestHandled logs a message about finishing handling the request to a node it marks the log entry as a healthcheck if isHealthCheck is true
type Zaplog ¶
func LogFast ¶ added in v0.0.18
func LogFast(ctx *fasthttp.RequestCtx) *Zaplog
func LogWithContext ¶
LogWithContext is invoking Zap Logger function with context
func LogWithFastContext ¶ added in v0.0.16
func LogWithFastContext(ctx *fasthttp.RequestCtx) *Zaplog
LogWithFastContext is invoking Zap Logger function with fasthttp context
func (*Zaplog) DebugRedact ¶ added in v0.0.5
func (*Zaplog) ErrorRedact ¶ added in v0.0.5
func (*Zaplog) FatalRedact ¶ added in v0.0.5
func (*Zaplog) InfoRedact ¶ added in v0.0.5
func (*Zaplog) PanicRedact ¶ added in v0.0.5
func (*Zaplog) WarnRedact ¶ added in v0.0.5
Click to show internal directories.
Click to hide internal directories.