Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Debugln(args ...interface{})
- func Dup(from, to int) error
- func EnableFnTrace()
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Errorln(args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Fatalln(args ...interface{})
- func GetLevel() string
- func GetLogger(ctx context.Context, pkg, fnName string) *logrus.Entry
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Infoln(args ...interface{})
- func LogInit()
- func New() *logrus.Entry
- func Print(args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func Request(next http.Handler) http.Handler
- func SetLevel(level string)
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- func Warnln(args ...interface{})
- func WithContext(ctx context.Context) *logrus.Entry
- func WithError(err error) *logrus.Entry
- func WithFields(fields Fields) *logrus.Entry
- type Fields
- type WriterHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableFnTrace ¶
func EnableFnTrace()
func New ¶
New create logger instance with request_id as a field also set the default format to JSON.
func WithFields ¶
Types ¶
type WriterHook ¶
WriterHook is a hook that writes logs of specified LogLevels to specified Writer
func (*WriterHook) Fire ¶
func (hook *WriterHook) Fire(entry *logrus.Entry) error
Fire will be called when some logging function is called with current hook It will format log entry to string and write it to appropriate writer
func (*WriterHook) Levels ¶
func (hook *WriterHook) Levels() []logrus.Level
Levels define on which log levels this hook would trigger
Click to show internal directories.
Click to hide internal directories.