Versions in this module Expand all Collapse all v1 v1.8.4 Feb 22, 2022 v1.8.3 Feb 22, 2022 Changes in this version + var DefaultLogDirectory = fmt.Sprintf("~/.%s/logs", constants.AppName) + func Sanitize(s string) string + func SanitizeArgs(a []interface{}) []interface + 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 + DisplayHighlight Highlight + DisplayLevel Level + FileSize int + FlushSize int + LogLevel Level + LoggerName string + MsgPrefix string + RotationInterval time.Duration + RotationSize int + func DefaultConfig() (Config, error) + type Factory interface + Close func() + GetDisplayLevel func(name string) (Level, error) + GetLogLevel func(name string) (Level, error) + GetLoggerNames func() []string + Make func(name string) (Logger, error) + MakeChain func(chainID string) (Logger, error) + MakeChainChild func(chainID string, name string) (Logger, error) + SetDisplayLevel func(name string, level Level) error + SetLogLevel func(name string, level Level) error + func NewFactory(config Config) Factory + type Highlight int + const Colors + const Plain + func ToHighlight(h string, fd uintptr) (Highlight, error) + func (h *Highlight) MarshalJSON() ([]byte, error) + type Level int + const Debug + const Error + const Fatal + const Info + const Off + const Trace + const Verbo + const Warn + func ToLevel(l string) (Level, error) + func (l *Level) UnmarshalJSON(b []byte) error + func (l Level) AlignedString() string + func (l Level) Color() Color + func (l Level) MarshalJSON() ([]byte, error) + func (l Level) String() string + type Log struct + func NewTestLog(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) GetDisplayLevel() Level + func (l *Log) GetLogLevel() Level + func (l *Log) Info(format string, args ...interface{}) + func (l *Log) RecoverAndExit(f, exit func()) + 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) Trace(format string, args ...interface{}) + 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{}) + GetDisplayLevel func() Level + GetLogLevel func() Level + Info func(format string, args ...interface{}) + RecoverAndExit func(f, exit func()) + 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() + Trace func(format string, args ...interface{}) + Verbo func(format string, args ...interface{}) + Warn func(format string, args ...interface{}) + type NoFactory struct + func (NoFactory) Close() + func (NoFactory) GetDisplayLevel(name string) (Level, error) + func (NoFactory) GetLogLevel(name string) (Level, error) + func (NoFactory) GetLoggerNames() []string + func (NoFactory) Make(string) (Logger, error) + func (NoFactory) MakeChain(string) (Logger, error) + func (NoFactory) MakeChainChild(string, string) (Logger, error) + func (NoFactory) SetDisplayLevel(name string, level Level) error + func (NoFactory) SetLogLevel(name string, level Level) error + type NoIOWriter struct + func (nw *NoIOWriter) Close() error + func (nw *NoIOWriter) Flush() error + func (nw *NoIOWriter) Initialize(Config) (int, error) + func (nw *NoIOWriter) Rotate() error + func (nw *NoIOWriter) Write(p []byte) (int, error) + func (nw *NoIOWriter) WriteString(s string) (int, 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) GetDisplayLevel() Level + func (NoLog) GetLogLevel() Level + func (NoLog) Info(format string, args ...interface{}) + func (NoLog) RecoverAndExit(f, exit func()) + 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) Trace(format string, args ...interface{}) + func (NoLog) Verbo(format string, args ...interface{}) + func (NoLog) Warn(format string, args ...interface{}) + func (NoLog) Write([]byte) (int, error) + type RotatingWriter interface + Close func() error + Flush func() error + Initialize func(Config) (int, error) + Rotate func() error + Write func(b []byte) (int, error) + WriteString func(s string) (int, error) + type RoutineID struct + func (RoutineID) String() string + type Stacktrace struct + Global bool + func (st Stacktrace) String() string