logstats

package
v0.20.4 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger is a zero-allocation logger for logstats. It can output logs as JSON or as plaintext, following the commonly used logstats format that is shared between the tablets and the gates.

func NewLogger

func NewLogger() *Logger

NewLogger returns a new Logger instance to perform logstats logging. The logger must be initialized with (*Logger).Init before usage and flushed with (*Logger).Flush once all the key-values have been written to it.

func (*Logger) BindVariables

func (log *Logger) BindVariables(bvars map[string]*querypb.BindVariable, full bool)

func (*Logger) Bool

func (log *Logger) Bool(b bool)

func (*Logger) Duration

func (log *Logger) Duration(t time.Duration)

func (*Logger) Flush

func (log *Logger) Flush(w io.Writer) (err error)

func (*Logger) Init

func (log *Logger) Init(json bool)

func (*Logger) Int

func (log *Logger) Int(i int64)

func (*Logger) Key

func (log *Logger) Key(key string)

func (*Logger) Redacted

func (log *Logger) Redacted()

func (*Logger) String

func (log *Logger) String(value string)

func (*Logger) StringSingleQuoted

func (log *Logger) StringSingleQuoted(value string)

func (*Logger) StringUnquoted

func (log *Logger) StringUnquoted(value string)

func (*Logger) Strings

func (log *Logger) Strings(strs []string)

func (*Logger) TabTerminated

func (log *Logger) TabTerminated()

func (*Logger) Time

func (log *Logger) Time(t time.Time)

func (*Logger) Uint

func (log *Logger) Uint(u uint64)

Jump to

Keyboard shortcuts

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