Versions in this module Expand all Collapse all v0 v0.12.5 Mar 4, 2020 v0.12.4 Mar 3, 2020 v0.12.3 Feb 7, 2019 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.2 Dec 13, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.1 Dec 8, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.0 Dec 2, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work Changes in this version + const FmtFlagAppName + const FmtFlagCustom + const FmtFlagFields + const FmtFlagInstanceName + const FmtFlagLevel + const FmtFlagLine + const FmtFlagLongfile + const FmtFlagMessage + const FmtFlagPrincipal + const FmtFlagRequestID + const FmtFlagShortfile + const FmtFlagTime + const FmtFlagUTCTime + const FmtFlagUnknown + const LevelDebug + const LevelError + const LevelFatal + const LevelInfo + const LevelPanic + const LevelTrace + const LevelUnknown + const LevelWarn + var DefaultPattern = "%time:2006-01-02 15:04:05.000 %level:-5 %message" + var ErrHookFuncIsNil = errors.New("log: hook func is nil") + var ErrLogReceiverIsNil = errors.New("log: receiver is nil") + var FmtFlags = map[string]ess.FmtFlag + func AddContext(fields Fields) + func AddHook(name string, hook HookFunc) error + func Debug(v ...interface{}) + func Debugf(format string, v ...interface{}) + func Error(v ...interface{}) + func Errorf(format string, v ...interface{}) + func Fatal(v ...interface{}) + func Fatalf(format string, v ...interface{}) + func Fatalln(v ...interface{}) + func Info(v ...interface{}) + func Infof(format string, v ...interface{}) + func IsLevelDebug() bool + func IsLevelError() bool + func IsLevelFatal() bool + func IsLevelInfo() bool + func IsLevelPanic() bool + func IsLevelTrace() bool + func IsLevelWarn() bool + func Level() string + func Panic(v ...interface{}) + func Panicf(format string, v ...interface{}) + func Panicln(v ...interface{}) + func Print(v ...interface{}) + func Printf(format string, v ...interface{}) + func Println(v ...interface{}) + func SetDefaultLogger(l *Logger) + func SetLevel(level string) error + func SetPattern(pattern string) error + func SetWriter(w io.Writer) + func ToGoLogger() *slog.Logger + func Trace(v ...interface{}) + func Tracef(format string, v ...interface{}) + func Warn(v ...interface{}) + func Warnf(format string, v ...interface{}) + func Writer() io.Writer + type ConsoleReceiver struct + func (c *ConsoleReceiver) Init(cfg *config.Config) error + func (c *ConsoleReceiver) IsCallerInfo() bool + func (c *ConsoleReceiver) Log(entry *Entry) + func (c *ConsoleReceiver) SetPattern(pattern string) error + func (c *ConsoleReceiver) SetWriter(w io.Writer) + func (c *ConsoleReceiver) Writer() io.Writer + type Entry struct + AppName string + Fields Fields + File string + InstanceName string + Level level + Line int + Message string + Principal string + RequestID string + Time time.Time + func (e *Entry) Debug(v ...interface{}) + func (e *Entry) Debugf(format string, v ...interface{}) + func (e *Entry) Error(v ...interface{}) + func (e *Entry) Errorf(format string, v ...interface{}) + func (e *Entry) Fatal(v ...interface{}) + func (e *Entry) Fatalf(format string, v ...interface{}) + func (e *Entry) Fatalln(v ...interface{}) + func (e *Entry) Info(v ...interface{}) + func (e *Entry) Infof(format string, v ...interface{}) + func (e *Entry) IsLevelDebug() bool + func (e *Entry) IsLevelError() bool + func (e *Entry) IsLevelFatal() bool + func (e *Entry) IsLevelInfo() bool + func (e *Entry) IsLevelPanic() bool + func (e *Entry) IsLevelTrace() bool + func (e *Entry) IsLevelWarn() bool + func (e *Entry) MarshalJSON() ([]byte, error) + func (e *Entry) Panic(v ...interface{}) + func (e *Entry) Panicf(format string, v ...interface{}) + func (e *Entry) Panicln(v ...interface{}) + func (e *Entry) Print(v ...interface{}) + func (e *Entry) Printf(format string, v ...interface{}) + func (e *Entry) Println(v ...interface{}) + func (e *Entry) Reset() + func (e *Entry) ToGoLogger() *slog.Logger + func (e *Entry) Trace(v ...interface{}) + func (e *Entry) Tracef(format string, v ...interface{}) + func (e *Entry) Warn(v ...interface{}) + func (e *Entry) Warnf(format string, v ...interface{}) + func (e *Entry) WithField(key string, value interface{}) Loggerer + func (e *Entry) WithFields(fields Fields) Loggerer + type Fields map[string]interface + type FileReceiver struct + func (f *FileReceiver) Init(cfg *config.Config) error + func (f *FileReceiver) IsCallerInfo() bool + func (f *FileReceiver) Log(entry *Entry) + func (f *FileReceiver) SetPattern(pattern string) error + func (f *FileReceiver) SetWriter(w io.Writer) + func (f *FileReceiver) Writer() io.Writer + type FlagPart struct + Flag ess.FmtFlag + Format string + Name string + type HookFunc func(e Entry) + type Logger struct + func New(cfg *config.Config) (*Logger, error) + func NewWithContext(cfg *config.Config, ctx Fields) (*Logger, error) + func (l *Logger) AddContext(fields Fields) + func (l *Logger) AddHook(name string, hook HookFunc) error + func (l *Logger) Debug(v ...interface{}) + func (l *Logger) Debugf(format string, v ...interface{}) + func (l *Logger) Error(v ...interface{}) + func (l *Logger) Errorf(format string, v ...interface{}) + func (l *Logger) Fatal(v ...interface{}) + func (l *Logger) Fatalf(format string, v ...interface{}) + func (l *Logger) Fatalln(v ...interface{}) + func (l *Logger) Info(v ...interface{}) + func (l *Logger) Infof(format string, v ...interface{}) + func (l *Logger) IsLevelDebug() bool + func (l *Logger) IsLevelError() bool + func (l *Logger) IsLevelFatal() bool + func (l *Logger) IsLevelInfo() bool + func (l *Logger) IsLevelPanic() bool + func (l *Logger) IsLevelTrace() bool + func (l *Logger) IsLevelWarn() bool + func (l *Logger) Level() string + func (l *Logger) New(fields Fields) *Logger + func (l *Logger) Panic(v ...interface{}) + func (l *Logger) Panicf(format string, v ...interface{}) + func (l *Logger) Panicln(v ...interface{}) + func (l *Logger) Print(v ...interface{}) + func (l *Logger) Printf(format string, v ...interface{}) + func (l *Logger) Println(v ...interface{}) + func (l *Logger) SetLevel(level string) error + func (l *Logger) SetPattern(pattern string) error + func (l *Logger) SetReceiver(receiver Receiver) error + func (l *Logger) SetWriter(w io.Writer) + func (l *Logger) ToGoLogger() *slog.Logger + func (l *Logger) Trace(v ...interface{}) + func (l *Logger) Tracef(format string, v ...interface{}) + func (l *Logger) Warn(v ...interface{}) + func (l *Logger) Warnf(format string, v ...interface{}) + func (l *Logger) WithField(key string, value interface{}) Loggerer + func (l *Logger) WithFields(fields Fields) Loggerer + type Loggerer interface + Debug func(v ...interface{}) + Debugf func(format string, v ...interface{}) + Error func(v ...interface{}) + Errorf func(format string, v ...interface{}) + Fatal func(v ...interface{}) + Fatalf func(format string, v ...interface{}) + Fatalln func(v ...interface{}) + Info func(v ...interface{}) + Infof func(format string, v ...interface{}) + IsLevelDebug func() bool + IsLevelError func() bool + IsLevelFatal func() bool + IsLevelInfo func() bool + IsLevelPanic func() bool + IsLevelTrace func() bool + IsLevelWarn func() bool + Panic func(v ...interface{}) + Panicf func(format string, v ...interface{}) + Panicln func(v ...interface{}) + Print func(v ...interface{}) + Printf func(format string, v ...interface{}) + Println func(v ...interface{}) + ToGoLogger func() *slog.Logger + Trace func(v ...interface{}) + Tracef func(format string, v ...interface{}) + Warn func(v ...interface{}) + Warnf func(format string, v ...interface{}) + WithField func(key string, value interface{}) Loggerer + WithFields func(fields Fields) Loggerer + func WithField(key string, value interface{}) Loggerer + func WithFields(fields Fields) Loggerer + type Receiver interface + Init func(cfg *config.Config) error + IsCallerInfo func() bool + Log func(e *Entry) + SetPattern func(pattern string) error + SetWriter func(w io.Writer) + Writer func() io.Writer