log

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlushWriter

type FlushWriter interface {
	io.Writer
	Flush() error
}

type JSONResultWriter

type JSONResultWriter struct{}

func (*JSONResultWriter) Write

func (*JSONResultWriter) Write(w io.Writer, result scan.Result) error

type Logger

type Logger interface {
	Error(err error)
	LogResults(ctx context.Context, results <-chan scan.Result)
}

func NewLogger

func NewLogger(w io.Writer, label string, opts ...LoggerOption) (Logger, error)

type LoggerOption

type LoggerOption func(*logger)

func FlushInterval

func FlushInterval(interval time.Duration) LoggerOption

func JSON

func JSON() LoggerOption

func Plain

func Plain() LoggerOption

type PlainResultWriter

type PlainResultWriter struct{}

func (*PlainResultWriter) Write

func (*PlainResultWriter) Write(w io.Writer, result scan.Result) error

type ResultWriter

type ResultWriter interface {
	Write(w io.Writer, result scan.Result) error
}

type UniqueLogger

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

func NewUniqueLogger

func NewUniqueLogger(logger Logger) *UniqueLogger

func (*UniqueLogger) Error

func (l *UniqueLogger) Error(err error)

func (*UniqueLogger) LogResults

func (l *UniqueLogger) LogResults(ctx context.Context, results <-chan scan.Result)

Jump to

Keyboard shortcuts

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