logging

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 13 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
}

func Ctx

func Ctx(ctx context.Context) *Logger

Ctx returns the logger associated with the context. If no logger is associated with the context then the default logger will be returned

func DefaultLogger

func DefaultLogger() Logger

func NewLogger

func NewLogger(out, err io.Writer, json bool, quiet bool, verbose bool) Logger

func (*Logger) Debug

func (l *Logger) Debug(tag string, f string, args ...interface{})

func (*Logger) Info

func (l *Logger) Info(tag string, f string, args ...interface{})

func (*Logger) InfoWriter

func (l *Logger) InfoWriter(tag string) *Writer

func (*Logger) Out

func (l *Logger) Out(f string, args ...interface{})

func (*Logger) OutRaw

func (l *Logger) OutRaw(s string)

func (*Logger) Output

func (l *Logger) Output(tag string, f string, args ...interface{})

func (*Logger) OutputWriter

func (l *Logger) OutputWriter(tag string) *Writer

func (*Logger) PrintPlotResults

func (l *Logger) PrintPlotResults(tag string, pr wfapi.PlotResults)

func (*Logger) PrintRunRecord

func (l *Logger) PrintRunRecord(tag string, rr wfapi.RunRecord, memoized bool)

func (*Logger) RawWriter

func (l *Logger) RawWriter() *Writer

func (Logger) WithContext

func (l Logger) WithContext(ctx context.Context) context.Context

WithContext returns a copy of ctx with the logger associated. If an instance of logger is already in the context, the context is not updated. This function is following the convention used by zerolog for passing loggers via context.

type Writer

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

func (*Writer) Write

func (w *Writer) Write(data []byte) (n int, err error)

Write raw bytes to to the log

Errors: none -- return value used keep io.Writer interface

Jump to

Keyboard shortcuts

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