fabenc

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResetColor

func ResetColor() string

func SetSequence

func SetSequence(s uint64)

Types

type Color

type Color uint8
const (
	ColorBlack Color = iota + 30
	ColorRed
	ColorGreen
	ColorYellow
	ColorBlue
	ColorMagenta
	ColorCyan
	ColorWhite
)
const ColorNone Color = 0

func (Color) Bold

func (c Color) Bold() string

func (Color) Normal

func (c Color) Normal() string

type ColorFormatter

type ColorFormatter struct {
	Bold  bool
	Reset bool
}

func (ColorFormatter) Format

func (c ColorFormatter) Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field)

func (ColorFormatter) LevelColor

func (c ColorFormatter) LevelColor(l zapcore.Level) Color

type FormatEncoder

type FormatEncoder struct {
	zapcore.Encoder
	// contains filtered or unexported fields
}

func NewFormatEncoder

func NewFormatEncoder(formatters ...Formatter) *FormatEncoder

func (*FormatEncoder) Clone

func (f *FormatEncoder) Clone() zapcore.Encoder

func (*FormatEncoder) EncodeEntry

func (f *FormatEncoder) EncodeEntry(entry zapcore.Entry, fields []zapcore.Field) (*buffer.Buffer, error)

type Formatter

type Formatter interface {
	Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field)
}

func NewFormatter

func NewFormatter(verb, format string) (Formatter, error)

func ParseFormat

func ParseFormat(spec string) ([]Formatter, error)

type LevelFormatter

type LevelFormatter struct{ FormatVerb string }

func (LevelFormatter) Format

func (l LevelFormatter) Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field)

type MessageFormatter

type MessageFormatter struct{ FormatVerb string }

func (MessageFormatter) Format

func (m MessageFormatter) Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field)

type ModuleFormatter

type ModuleFormatter struct{ FormatVerb string }

func (ModuleFormatter) Format

func (m ModuleFormatter) Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field)

type MultiFormatter

type MultiFormatter struct {
	// contains filtered or unexported fields
}

func NewMultiFormatter

func NewMultiFormatter(formatters ...Formatter) *MultiFormatter

func (*MultiFormatter) Format

func (m *MultiFormatter) Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field)

func (*MultiFormatter) SetFormatters

func (m *MultiFormatter) SetFormatters(formatters []Formatter)

type SequenceFormatter

type SequenceFormatter struct{ FormatVerb string }

func (SequenceFormatter) Format

func (s SequenceFormatter) Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field)

type ShortFuncFormatter

type ShortFuncFormatter struct{ FormatVerb string }

func (ShortFuncFormatter) Format

func (s ShortFuncFormatter) Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field)

type StringFormatter

type StringFormatter struct{ Value string }

func (StringFormatter) Format

func (s StringFormatter) Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field)

type TimeFormatter

type TimeFormatter struct{ Layout string }

func (TimeFormatter) Format

func (t TimeFormatter) Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field)

Jump to

Keyboard shortcuts

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