Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFallback = errors.New("fallback")
Functions ¶
Types ¶
type JSON ¶
type JSON struct { io.Writer AppendNewLine bool AppendKeySafe bool FloatInfNaN bool TimeFormat string TimeZone *time.Location Rename RenameFunc // contains filtered or unexported fields }
func (*JSON) ConvertKey ¶ added in v0.22.1
type KeyRenamer ¶
type KeyRenamer struct { Rewriter RewriterRule Fallback RewriterRule // contains filtered or unexported fields }
func NewKeyRenamer ¶
func NewKeyRenamer(rew RewriterRule, rules ...RenameRule) *KeyRenamer
func (*KeyRenamer) Append ¶
func (w *KeyRenamer) Append(rules ...RenameRule)
func (*KeyRenamer) Rewrite ¶
func (w *KeyRenamer) Rewrite(b, p []byte, path []tlog.RawMessage, kst, st int) ([]byte, int, error)
type Logfmt ¶
type Logfmt struct { io.Writer TimeFormat string TimeZone *time.Location DurationFormat string DurationDiv time.Duration FloatFormat string FloatChar byte FloatPrecision int QuoteChars string QuoteAnyValue bool QuoteEmptyValue bool PairSeparator string KVSeparator string ArrSeparator string MapSeparator string MapKVSeparator string MaxValPad int AppendKeySafe bool SubObjects bool Rename RenameFunc Colorize bool KeyColor []byte ValColor []byte // contains filtered or unexported fields }
func (*Logfmt) ConvertValue ¶
type RenameRule ¶
type RenameRule struct { Path []tlog.RawMessage Rename []byte Prefix []byte Remove bool }
type Rewriter ¶
type Rewriter struct { io.Writer tlwire.Decoder tlwire.Encoder Rule RewriterRule // contains filtered or unexported fields }
func NewRewriter ¶
type RewriterFunc ¶
func (RewriterFunc) Rewrite ¶
func (f RewriterFunc) Rewrite(b, p []byte, path []tlog.RawMessage, kst, st int) ([]byte, int, error)
type RewriterRule ¶
type SimpleRenameRule ¶
type SimpleRenamer ¶
type SimpleRenamer struct { tlwire.Decoder Rules map[string]SimpleRenameRule Fallback RenameFunc }
Click to show internal directories.
Click to hide internal directories.