logger

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOG_LEVEL_DEBUG int = 1
	LOG_LEVEL_INFO  int = 2
	LOG_LEVEL_ERROR int = 3
)
View Source
const FORCE_STDOUT = false
View Source
const PRINT_TIMESTAMP = true

Variables

This section is empty.

Functions

func MemberIdToStr

func MemberIdToStr(memberId primitives.MemberId) string

func NewConsoleLogger

func NewConsoleLogger(uid string) interfaces.Logger

func NewSilentLogger

func NewSilentLogger() interfaces.Logger

Types

type ConsoleLogger

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

Deprecated; use LHLogger wrapping Scribe

func (*ConsoleLogger) ConsensusTrace added in v0.2.6

func (l *ConsoleLogger) ConsensusTrace(format string, fields ...*log.Field)

func (*ConsoleLogger) Debug

func (l *ConsoleLogger) Debug(format string, args ...interface{})

func (*ConsoleLogger) Error

func (l *ConsoleLogger) Error(format string, args ...interface{})

func (*ConsoleLogger) Info

func (l *ConsoleLogger) Info(format string, args ...interface{})

type LHLogger

type LHLogger interface {
	Debug(format string, args ...interface{})
	Info(format string, args ...interface{})
	Error(format string, args ...interface{})
	ExternalLogger() interfaces.Logger
	ConsensusTrace(msg string, err error, fields ...*log.Field)
}

func NewLhLogger

func NewLhLogger(config *interfaces.Config, state *state.State) LHLogger

type LogLevel

type LogLevel int
const LEVEL_DEBUG LogLevel = 0
const LEVEL_ERROR LogLevel = 2
const LEVEL_INFO LogLevel = 1

type SilentLogger

type SilentLogger struct {
}

func (*SilentLogger) ConsensusTrace added in v0.2.6

func (l *SilentLogger) ConsensusTrace(format string, fields ...*log.Field)

func (*SilentLogger) Debug

func (*SilentLogger) Debug(format string, args ...interface{})

func (*SilentLogger) Error

func (*SilentLogger) Error(format string, args ...interface{})

func (*SilentLogger) Info

func (*SilentLogger) Info(format string, args ...interface{})

type TestLog added in v0.2.0

type TestLog interface {
	Fatal(args ...interface{})
	Log(args ...interface{})
	Error(args ...interface{})
	Name() string
}

Jump to

Keyboard shortcuts

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