rainbond: github.com/goodrain/rainbond/node/nodem/logger/testlog Index | Files

package testlog

import "github.com/goodrain/rainbond/node/nodem/logger/testlog"


Package Files



const Name = "test"

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

func New Uses

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

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

func ValidateLogOpt Uses

func ValidateLogOpt(cfg map[string]string) error

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

type TestLogger Uses

type TestLogger struct {
    // contains filtered or unexported fields

TestLogger is Logger implementation for test

func (*TestLogger) Close Uses

func (l *TestLogger) Close() error

Close closes underlying file and signals all readers to stop.

func (*TestLogger) Log Uses

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

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

func (*TestLogger) Name Uses

func (l *TestLogger) Name() string

Name returns name of this logger.

Package testlog imports 4 packages (graph) and is imported by 1 packages. Updated 2018-11-21. Refresh now. Tools for package owners.