logutil

package
v5.0.0-rc+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File(file *backup.File) zapcore.Field

File make the zap fields for a file.

func Files

func Files(fs []*backup.File) zapcore.Field

Files make the zap field for a set of file.

func InitRedact

func InitRedact(redactLog bool)

InitRedact inits the enableRedactLog

func NeedRedact

func NeedRedact() bool

NeedRedact returns whether to redact log

func RedactString

func RedactString(arg string) string

RedactString receives string argument and return omitted information if redact log enabled

func RedactStringer

func RedactStringer(arg fmt.Stringer) fmt.Stringer

RedactStringer receives stringer argument and return omitted information if redact log enabled

func Region

func Region(region *metapb.Region) zapcore.Field

Region make the zap fields for a region.

func RewriteRule

func RewriteRule(rewriteRule *import_sstpb.RewriteRule) zapcore.Field

RewriteRule make the zap fields for a rewrite rule.

func SSTMeta

func SSTMeta(sstMeta *import_sstpb.SSTMeta) zapcore.Field

SSTMeta make the zap fields for a SST meta.

func ShortError

func ShortError(err error) zapcore.Field

ShortError make the zap field to display error without verbose representation (e.g. the stack trace).

func WrapKey

func WrapKey(key []byte) fmt.Stringer

WrapKey wrap a key as a Stringer that can print proper upper hex format.

func WrapKeys

func WrapKeys(keys [][]byte) zapcore.ArrayMarshaler

WrapKeys wrap keys as an ArrayMarshaler that can print proper upper hex format.

func ZapRedactReflect

func ZapRedactReflect(key string, val interface{}) zapcore.Field

ZapRedactReflect receives zap.Reflect and return omitted information if redact log enabled

func ZapRedactStringer

func ZapRedactStringer(key string, arg fmt.Stringer) zap.Field

ZapRedactStringer receives stringer argument and return omitted information in zap.Field if redact log enabled

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL