Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsoleLogger

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

    ConsoleLogger is the struct used for mesh command

    func NewConsoleLogger

    func NewConsoleLogger(stdOut, stdErr io.Writer, scope *log.Scope) *ConsoleLogger

      NewConsoleLogger creates a new logger and returns a pointer to it. stdOut and stdErr can be used to capture output for testing. If scope is nil, the default scope is used.

      func NewDefaultLogger

      func NewDefaultLogger() *ConsoleLogger

        NewDefaultLogger creates a new logger that outputs to stdout/stderr at default scope.

        func (*ConsoleLogger) LogAndError

        func (l *ConsoleLogger) LogAndError(v ...interface{})

        func (*ConsoleLogger) LogAndErrorf

        func (l *ConsoleLogger) LogAndErrorf(format string, a ...interface{})

        func (*ConsoleLogger) LogAndFatal

        func (l *ConsoleLogger) LogAndFatal(a ...interface{})

        func (*ConsoleLogger) LogAndFatalf

        func (l *ConsoleLogger) LogAndFatalf(format string, a ...interface{})

        func (*ConsoleLogger) LogAndPrint

        func (l *ConsoleLogger) LogAndPrint(v ...interface{})

        func (*ConsoleLogger) LogAndPrintf

        func (l *ConsoleLogger) LogAndPrintf(format string, a ...interface{})

        func (*ConsoleLogger) Print

        func (l *ConsoleLogger) Print(s string)

        func (*ConsoleLogger) PrintErr

        func (l *ConsoleLogger) PrintErr(s string)

        type Logger

        type Logger interface {
        	LogAndPrint(v ...interface{})
        	LogAndError(v ...interface{})
        	LogAndFatal(a ...interface{})
        	LogAndPrintf(format string, a ...interface{})
        	LogAndErrorf(format string, a ...interface{})
        	LogAndFatalf(format string, a ...interface{})
        	Print(s string)
        	PrintErr(s string)
        }

          Logger provides optional log taps for console and test buffer outputs.

          Source Files