Versions in this module Expand all Collapse all v0 v0.14.0 Apr 24, 2024 v0.13.0 Feb 27, 2024 Changes in this version + const Black + const Blue + const BoldBlack + const BoldBlue + const BoldCyan + const BoldGray + const BoldGreen + const BoldMagenta + const BoldRed + const BoldYellow + const Cyan + const Default + const Gray + const Green + const LogKeyCaller + const LogKeyContext + const LogKeyLevel + const LogKeyMessage + const LogKeyName + const LogKeyStacktrace + const LogKeyTimestamp + const Magenta + const Red + const Yellow + var BgColors []string + var ColorNames = map[string]Color + var FgColors []string + var ResetColor = "\x1b[39;49;22m" + var TmplColorFuncMap template.FuncMap + var TmplColorFuncMapNonTerm template.FuncMap + var TmplFuncMap = template.FuncMap + var TmplFuncMapNonTerm = template.FuncMap + func Capped(cap int, v interface{}) string + func Colored(s interface{}, colorNames ...string) string + func ColoredWithCode(s interface{}, fg, bg Color) string + func ColoredWithName(s interface{}, fgName, bgName string) string + func DebugShowcase() + func IsTerminal(w io.Writer) bool + func Join(sep string, values ...interface{}) string + func MakeKVFunc(ignored utils.StringSet) func(Fields) string + func MakeLevelFunc(term bool) func(padding int, kvs Fields) string + func MakeLevelPaddingFunc(v interface{}) func(int) string + func MakeQuickColorFunc(fg Color) func(s interface{}) string + func NewZapFormattedEncoder(cfg zapcore.EncoderConfig, formatter TextFormatter, isTerm bool) zapcore.Encoder + func NewZapWriterWrapper(w io.Writer) zapcore.WriteSyncer + func NoopColored(v interface{}, _ ...string) interface + func NoopQuickColor(v interface{}) interface + func Padding(padding int, v interface{}) string + func Sprint(v interface{}) string + func Trace(tid, sid, pid interface{}) string + type Color uint8 + type Fields map[string]interface + type KitTextLoggerAdapter struct + Formatter TextFormatter + IsTerminal bool + Writer io.Writer + func NewKitTextLoggerAdapter(writer io.Writer, formatter TextFormatter) *KitTextLoggerAdapter + func (l *KitTextLoggerAdapter) Log(keyvals ...interface{}) error + type SliceArrayEncoder struct + func (s *SliceArrayEncoder) AppendBool(v bool) + func (s *SliceArrayEncoder) AppendByteString(v []byte) + func (s *SliceArrayEncoder) AppendComplex128(v complex128) + func (s *SliceArrayEncoder) AppendComplex64(v complex64) + func (s *SliceArrayEncoder) AppendDuration(v time.Duration) + func (s *SliceArrayEncoder) AppendFloat32(v float32) + func (s *SliceArrayEncoder) AppendFloat64(v float64) + func (s *SliceArrayEncoder) AppendInt(v int) + func (s *SliceArrayEncoder) AppendInt16(v int16) + func (s *SliceArrayEncoder) AppendInt32(v int32) + func (s *SliceArrayEncoder) AppendInt64(v int64) + func (s *SliceArrayEncoder) AppendInt8(v int8) + func (s *SliceArrayEncoder) AppendString(v string) + func (s *SliceArrayEncoder) AppendTime(v time.Time) + func (s *SliceArrayEncoder) AppendUint(v uint) + func (s *SliceArrayEncoder) AppendUint16(v uint16) + func (s *SliceArrayEncoder) AppendUint32(v uint32) + func (s *SliceArrayEncoder) AppendUint64(v uint64) + func (s *SliceArrayEncoder) AppendUint8(v uint8) + func (s *SliceArrayEncoder) AppendUintptr(v uintptr) + func (s *SliceArrayEncoder) Latest() interface{} + type TemplatedFormatter struct + func NewTemplatedFormatter(tmpl string, fixedFields utils.StringSet, isTerm bool) *TemplatedFormatter + func (f *TemplatedFormatter) Format(kvs Fields, w io.Writer) error + type TerminalAware interface + IsTerminal func() bool + type TextFormatter interface + Format func(kvs Fields, w io.Writer) error + type ZapFormattedEncoder struct + Config *zapcore.EncoderConfig + Formatter TextFormatter + IsTerminal bool + func (enc *ZapFormattedEncoder) Clone() zapcore.Encoder + func (enc *ZapFormattedEncoder) EncodeEntry(entry zapcore.Entry, fields []zapcore.Field) (*buffer.Buffer, error) + type ZapTerminalCore struct + func (s ZapTerminalCore) IsTerminal() bool + type ZapWriterWrapper struct + func (ZapWriterWrapper) Sync() error + func (s ZapWriterWrapper) IsTerminal() bool