Versions in this module Expand all Collapse all v0 v0.1.0 Apr 19, 2020 Changes in this version + const DefaultLogDirectory + type Color string + const Black + const Blue + const Bold + const Cyan + const DarkGray + const Green + const LightBlue + const LightCyan + const LightGray + const LightGreen + const LightPurple + const LightRed + const Orange + const Purple + const Red + const Reset + const Reverse + const White + const Yellow + func (lc Color) Wrap(text string) string + type Config struct + Assertions bool + Directory string + DisableContextualDisplaying bool + DisableDisplaying bool + DisableFlushOnWrite bool + DisableLogging bool + DisplayLevel Level + FileSize int + FlushSize int + LogLevel Level + MsgPrefix string + RotationInterval time.Duration + RotationSize int + func DefaultConfig() (Config, error) + type Factory interface + Close func() + Make func() (Logger, error) + MakeChain func(chainID ids.ID, subdir string) (Logger, error) + MakeSubdir func(subdir string) (Logger, error) + func NewFactory(config Config) Factory + type Level int + const Debug + const Error + const Fatal + const Info + const Off + const Verbo + const Warn + func ToLevel(l string) (Level, error) + func (l Level) Color() Color + func (l Level) String() string + type Log struct + func New(config Config) (*Log, error) + func (l *Log) AssertDeferredNoError(f func() error) + func (l *Log) AssertDeferredTrue(f func() bool, format string, args ...interface{}) + func (l *Log) AssertNoError(err error) + func (l *Log) AssertTrue(b bool, format string, args ...interface{}) + func (l *Log) Debug(format string, args ...interface{}) + func (l *Log) Error(format string, args ...interface{}) + func (l *Log) Fatal(format string, args ...interface{}) + func (l *Log) Info(format string, args ...interface{}) + func (l *Log) RecoverAndPanic(f func()) + func (l *Log) SetContextualDisplayingEnabled(enabled bool) + func (l *Log) SetDisplayLevel(lvl Level) + func (l *Log) SetDisplayingEnabled(enabled bool) + func (l *Log) SetLogLevel(lvl Level) + func (l *Log) SetLoggingEnabled(enabled bool) + func (l *Log) SetPrefix(prefix string) + func (l *Log) Stop() + func (l *Log) StopOnPanic() + func (l *Log) Verbo(format string, args ...interface{}) + func (l *Log) Warn(format string, args ...interface{}) + func (l *Log) Write(p []byte) (int, error) + type Logger interface + AssertDeferredNoError func(f func() error) + AssertDeferredTrue func(f func() bool, format string, args ...interface{}) + AssertNoError func(err error) + AssertTrue func(b bool, format string, args ...interface{}) + Debug func(format string, args ...interface{}) + Error func(format string, args ...interface{}) + Fatal func(format string, args ...interface{}) + Info func(format string, args ...interface{}) + RecoverAndPanic func(f func()) + SetContextualDisplayingEnabled func(bool) + SetDisplayLevel func(Level) + SetDisplayingEnabled func(bool) + SetLogLevel func(Level) + SetLoggingEnabled func(bool) + SetPrefix func(string) + Stop func() + StopOnPanic func() + Verbo func(format string, args ...interface{}) + Warn func(format string, args ...interface{}) + type NoFactory struct + func (NoFactory) Close() + func (NoFactory) Make() (Logger, error) + func (NoFactory) MakeChain(ids.ID, string) (Logger, error) + func (NoFactory) MakeSubdir(string) (Logger, error) + type NoLog struct + func (NoLog) AssertDeferredNoError(f func() error) + func (NoLog) AssertDeferredTrue(f func() bool, format string, args ...interface{}) + func (NoLog) AssertNoError(error) + func (NoLog) AssertTrue(b bool, format string, args ...interface{}) + func (NoLog) Debug(format string, args ...interface{}) + func (NoLog) Error(format string, args ...interface{}) + func (NoLog) Fatal(format string, args ...interface{}) + func (NoLog) Info(format string, args ...interface{}) + func (NoLog) RecoverAndPanic(f func()) + func (NoLog) SetContextualDisplayingEnabled(bool) + func (NoLog) SetDisplayLevel(Level) + func (NoLog) SetDisplayingEnabled(bool) + func (NoLog) SetLogLevel(Level) + func (NoLog) SetLoggingEnabled(bool) + func (NoLog) SetPrefix(string) + func (NoLog) Stop() + func (NoLog) StopOnPanic() + func (NoLog) Verbo(format string, args ...interface{}) + func (NoLog) Warn(format string, args ...interface{}) + func (NoLog) Write([]byte) (int, error) + type RoutineID struct + func (RoutineID) String() string + type Stacktrace struct + Global bool + func (st Stacktrace) String() string