logger

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fields

type Fields map[string]interface{}

type ILogger

type ILogger interface {
	Info(args ...interface{})
	Warning(args ...interface{})
	Error(args ...interface{})
	Fatal(args ...interface{})
	Panic(args ...interface{})

	Infof(format string, args ...interface{})
	Warningf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
	Panicf(format string, args ...interface{})

	InfoWithField(fields Fields)
	ErrorWithField(fields Fields)

	InfoWithContext(ctx context.Context, stage utils.ErrorStage, args ...interface{})
	ErrorWithContext(ctx context.Context, stage utils.ErrorStage, args ...interface{})
	InfoContextWithField(ctx context.Context, fields Fields)
	ErrorContextWithField(ctx context.Context, fields Fields)

	CloseStream()
}

type Logger

type Logger struct {
	Logrus *logrus.Logger
}

func NewLogger

func NewLogger(logrus *logrus.Logger) *Logger

func (*Logger) CloseStream

func (s *Logger) CloseStream()

func (*Logger) Error

func (s *Logger) Error(args ...interface{})

func (*Logger) ErrorContextWithField

func (s *Logger) ErrorContextWithField(ctx context.Context, fields Fields)

func (*Logger) ErrorWithContext

func (s *Logger) ErrorWithContext(ctx context.Context, stage utils.ErrorStage, args ...interface{})

func (*Logger) ErrorWithField

func (s *Logger) ErrorWithField(fields Fields)

func (*Logger) Errorf

func (s *Logger) Errorf(format string, args ...interface{})

func (*Logger) Fatal

func (s *Logger) Fatal(args ...interface{})

func (*Logger) Fatalf

func (s *Logger) Fatalf(format string, args ...interface{})

func (*Logger) Info

func (s *Logger) Info(args ...interface{})

func (*Logger) InfoContextWithField

func (s *Logger) InfoContextWithField(ctx context.Context, fields Fields)

func (*Logger) InfoWithContext

func (s *Logger) InfoWithContext(ctx context.Context, stage utils.ErrorStage, args ...interface{})

func (*Logger) InfoWithField

func (s *Logger) InfoWithField(fields Fields)

func (*Logger) Infof

func (s *Logger) Infof(format string, args ...interface{})

func (*Logger) Panic

func (s *Logger) Panic(args ...interface{})

func (*Logger) Panicf

func (s *Logger) Panicf(format string, args ...interface{})

func (*Logger) Warning

func (s *Logger) Warning(args ...interface{})

func (*Logger) Warningf

func (s *Logger) Warningf(format string, args ...interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL