Documentation ¶
Index ¶
- type Logger
- func (log *Logger) BindVariables(bvars map[string]*querypb.BindVariable, full bool)
- func (log *Logger) Bool(b bool)
- func (log *Logger) Duration(t time.Duration)
- func (log *Logger) Flush(w io.Writer) (err error)
- func (log *Logger) Init(json bool)
- func (log *Logger) Int(i int64)
- func (log *Logger) Key(key string)
- func (log *Logger) Redacted()
- func (log *Logger) String(value string)
- func (log *Logger) StringSingleQuoted(value string)
- func (log *Logger) StringUnquoted(value string)
- func (log *Logger) Strings(strs []string)
- func (log *Logger) TabTerminated()
- func (log *Logger) Time(t time.Time)
- func (log *Logger) Uint(u uint64)
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) StringSingleQuoted ¶
func (*Logger) StringUnquoted ¶
func (*Logger) TabTerminated ¶
func (log *Logger) TabTerminated()
Click to show internal directories.
Click to hide internal directories.