logrusx

package
v0.0.158 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 11 Imported by: 67

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger added in v0.0.125

type Logger struct {
	*logrus.Entry
	// contains filtered or unexported fields
}

func New

func New(name string, version string, opts ...Option) *Logger

New creates a new logger with all the important fields set.

func NewAudit added in v0.0.125

func NewAudit(name string, version string, opts ...Option) *Logger

func (*Logger) LeakSensitiveData added in v0.0.138

func (l *Logger) LeakSensitiveData() bool

func (*Logger) Logrus added in v0.0.125

func (l *Logger) Logrus() *logrus.Logger

func (*Logger) NewEntry added in v0.0.126

func (l *Logger) NewEntry() *Logger

func (*Logger) WithContext added in v0.0.126

func (l *Logger) WithContext(ctx context.Context) *Logger

func (*Logger) WithError added in v0.0.125

func (l *Logger) WithError(err error) *Logger

func (*Logger) WithField added in v0.0.125

func (l *Logger) WithField(key string, value interface{}) *Logger

func (*Logger) WithFields added in v0.0.125

func (l *Logger) WithFields(f logrus.Fields) *Logger

func (*Logger) WithRequest added in v0.0.125

func (l *Logger) WithRequest(r *http.Request) *Logger

func (*Logger) WithSensitiveField added in v0.0.125

func (l *Logger) WithSensitiveField(key string, value interface{}) *Logger

type Option added in v0.0.125

type Option func(*options)

func ForceFormat added in v0.0.125

func ForceFormat(format string) Option

func ForceFormatter added in v0.0.125

func ForceFormatter(formatter logrus.Formatter) Option

func ForceLevel added in v0.0.125

func ForceLevel(level logrus.Level) Option

func LeakSensitive added in v0.0.125

func LeakSensitive() Option

func ReportCaller added in v0.0.125

func ReportCaller(reportCaller bool) Option

func UseLogger added in v0.0.125

func UseLogger(l *logrus.Logger) Option

func WithExitFunc added in v0.0.125

func WithExitFunc(exitFunc func(int)) Option

func WithHook added in v0.0.127

func WithHook(hook logrus.Hook) Option

Jump to

Keyboard shortcuts

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