logutil

package
v4.0.11+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbbreviatedArray

func AbbreviatedArray(
	key string, elements interface{}, marshalFunc func(interface{}) []string,
) zap.Field

AbbreviatedArray constructs a field that abbreviates an array of elements.

func File

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

File make the zap fields for a file.

func Files

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

Files make the zap field for a set of file.

func Key

func Key(fieldKey string, key []byte) zap.Field

Key constructs a field that carries upper hex format key.

func Keys

func Keys(keys [][]byte) zap.Field

Keys constructs a field that carries upper hex format keys.

func Leader

func Leader(peer *metapb.Peer) zap.Field

Leader make the zap fields for a peer. nolint:interfacer

func Region

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

Region make the zap fields for a region.

func RewriteRule

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

RewriteRule make the zap fields for a rewrite rule.

func SSTMeta

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

SSTMeta make the zap fields for a SST meta.

func ShortError

func ShortError(err error) zap.Field

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

Types

type AbbreviatedArrayMarshaler

type AbbreviatedArrayMarshaler []string

AbbreviatedArrayMarshaler abbreviates an array of elements.

func (AbbreviatedArrayMarshaler) MarshalLogArray

func (abb AbbreviatedArrayMarshaler) MarshalLogArray(encoder zapcore.ArrayEncoder) error

MarshalLogArray implements zapcore.ArrayMarshaler.

Jump to

Keyboard shortcuts

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