transports

package
v0.0.0-...-841f565 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultFileWriter

func DefaultFileWriter(path string) logz.Builder

DefaultFileWriter uses FileWriteObserver to stream logs to an log file

func DefaultIOWriter

func DefaultIOWriter() (logz.Transport, error)

DefaultIOWriter uses IOWriteObserver to stream logs to os.Stdout and os.Stderr using logz.DefaultFormatter

func NewIOWriteFunc

func NewIOWriteFunc(stdOut, stdErr io.Writer, formatter logz.Formatter) logz.WriteFunc

NewIOWriteFunc a transport function that accepts a log.Entry and writes it to the provided io.Writers

func SuggestedLogFileWriter

func SuggestedLogFileWriter(tool, filename string) logz.Builder

SuggestedLogFileWriter creates a file writer that uses a suggested log file by tool and filename

Types

type FileWriter

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

func (*FileWriter) Cleanup

func (f *FileWriter) Cleanup() error

func (*FileWriter) Name

func (f *FileWriter) Name() string

func (*FileWriter) Stream

func (f *FileWriter) Stream() chan logz.ThreadSaveEntry

func (*FileWriter) Write

func (f *FileWriter) Write(entry logz.Entry) error

type IOWriter

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

func (*IOWriter) Cleanup

func (i *IOWriter) Cleanup() error

func (*IOWriter) Name

func (i *IOWriter) Name() string

func (*IOWriter) Stream

func (i *IOWriter) Stream() chan logz.ThreadSaveEntry

func (*IOWriter) Write

func (i *IOWriter) Write(entry logz.Entry) error

Jump to

Keyboard shortcuts

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