logger

package
v0.0.0-...-d0e1227 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJSONLogWriter

func NewJSONLogWriter(logger logr.Logger) io.Writer

func NewKLogLogWriter

func NewKLogLogWriter(log logr.Logger) io.Writer

func NewLogWriter

func NewLogWriter(log logr.Logger) io.Writer

func NewLogger

func NewLogger(w io.Writer, verbosity int) logr.Logger

func NewSink

func NewSink(w io.Writer, verbosity int) logr.LogSink

Types

type JSONLogEntry

type JSONLogEntry struct {
	Ts     string
	Level  string
	Msg    string
	Caller string
	Error  string
	Values map[string]interface{}
}

func (*JSONLogEntry) KeysAndValues

func (j *JSONLogEntry) KeysAndValues() []interface{}

func (*JSONLogEntry) MarshalJSON

func (j *JSONLogEntry) MarshalJSON() ([]byte, error)

func (*JSONLogEntry) UnmarshalJSON

func (j *JSONLogEntry) UnmarshalJSON(data []byte) error

type KLogEntry

type KLogEntry struct {
	LogLevel rune
	LogCode  int32
	Time     time.Time
	ThreadID int32
	Source   Source
	Message  string
}

func ParseKLogEntry

func ParseKLogEntry(s string) (*KLogEntry, error)

type Source

type Source struct {
	Filename string
	Line     int32
}

Jump to

Keyboard shortcuts

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