Versions in this module Expand all Collapse all v0 v0.0.2 Jul 21, 2021 Changes in this version + func GetLevelString(level LogLevel) string + func JSONFormatter(e *Entry) ([]byte, error) + func TextFormatter(e *Entry) ([]byte, error) + type Entry struct + Data interface{} + Err error + Error string + File string + Level LogLevel + LevelStr string + Line int + Message string + Time time.Time + TimeStr string + type Formatter func(*Entry) ([]byte, error) + type LogLevel int + const LevelDebug + const LevelError + const LevelInfo + const LevelWarn + type LogPrinter interface + Print func(content []byte, color bool) error + SetOutput func(writer io.Writer) + type Logger interface + Debug func(v ...interface{}) + Debugf func(format string, v ...interface{}) + Error func(v ...interface{}) + Errorf func(format string, v ...interface{}) + GetCallStack func() *tools.CallStack + GetFormatter func(level LogLevel) Formatter + GetLevel func() LogLevel + GetPrinter func(level LogLevel) LogPrinter + Info func(v ...interface{}) + Infof func(format string, v ...interface{}) + IsColorLog func() bool + IsLogFileLine func() bool + SetColorLog func(bool) + SetFormatter func(fmt Formatter) + SetLevel func(level LogLevel) + SetLogErrorCallStacks func(log bool) + SetLogFileLine func(log bool) + Warn func(v ...interface{}) + Warnf func(format string, v ...interface{}) + WithData func(data interface{}) *ProxyLogger + WithError func(err error) *ProxyLogger + type ProxyLogger struct + func (e *ProxyLogger) CleanProxyDataAndError() *ProxyLogger + func (e *ProxyLogger) Debug(v ...interface{}) + func (e *ProxyLogger) Debugf(format string, v ...interface{}) + func (e *ProxyLogger) Error(v ...interface{}) + func (e *ProxyLogger) Errorf(format string, v ...interface{}) + func (e *ProxyLogger) GetEntry() *Entry + func (e *ProxyLogger) Info(v ...interface{}) + func (e *ProxyLogger) Infof(format string, v ...interface{}) + func (e *ProxyLogger) ProxyLog(level LogLevel, callDepth int, v ...interface{}) + func (e *ProxyLogger) ProxyLogf(level LogLevel, callDepth int, format string, v ...interface{}) + func (e *ProxyLogger) SetProxyLevelAndTime(level LogLevel, tim time.Time) *ProxyLogger + func (e *ProxyLogger) SetProxyMessage(v ...interface{}) *ProxyLogger + func (e *ProxyLogger) SetProxyMessagef(format string, v ...interface{}) *ProxyLogger + func (e *ProxyLogger) Warn(v ...interface{}) + func (e *ProxyLogger) Warnf(format string, v ...interface{}) + func (e *ProxyLogger) WithData(data interface{}) *ProxyLogger + func (e *ProxyLogger) WithError(err error) *ProxyLogger + type StdLogPrinter struct + func NewStdLogPrinter(writer io.Writer, color string) *StdLogPrinter + func (s *StdLogPrinter) Print(message []byte, color bool) error + func (s *StdLogPrinter) SetOutput(writer io.Writer)