testlog

package
v5.1.8-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "test"

Name is the name of the file that the jsonlogger logs to.

Variables

This section is empty.

Functions

func New

func New(info logger.Info) (logger.Logger, error)

New creates new JSONFileLogger which writes to filename passed in on given context.

func ValidateLogOpt

func ValidateLogOpt(cfg map[string]string) error

ValidateLogOpt looks for json specific log options max-file & max-size.

Types

type TestLogger

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

TestLogger is Logger implementation for test

func (*TestLogger) Close

func (l *TestLogger) Close() error

Close closes underlying file and signals all readers to stop.

func (*TestLogger) Log

func (l *TestLogger) Log(msg *logger.Message) error

Log converts logger.Message to jsonlog.JSONLog and serializes it to file.

func (*TestLogger) Name

func (l *TestLogger) Name() string

Name returns name of this logger.

Jump to

Keyboard shortcuts

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