log

package
v0.0.0-...-2bd70a3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Error(msg string)
	Print(v ...interface{})

	Debugf(format string, v ...interface{})
	Infof(format string, v ...interface{})
	Errorf(format string, v ...interface{})
	Panicf(format string, v ...interface{})

	ContextDebugf(ctx context.Context, format string, v ...interface{})
	ContextInfof(ctx context.Context, format string, v ...interface{})
	ContextErrorf(ctx context.Context, format string, v ...interface{})
	ContextPanicf(ctx context.Context, format string, v ...interface{})
}

type NullLogger

type NullLogger struct{}

func (NullLogger) ContextDebugf

func (n NullLogger) ContextDebugf(ctx context.Context, format string, v ...interface{})

func (NullLogger) ContextErrorf

func (n NullLogger) ContextErrorf(ctx context.Context, format string, v ...interface{})

func (NullLogger) ContextInfof

func (n NullLogger) ContextInfof(ctx context.Context, format string, v ...interface{})

func (NullLogger) ContextPanicf

func (n NullLogger) ContextPanicf(ctx context.Context, format string, v ...interface{})

func (NullLogger) Debugf

func (n NullLogger) Debugf(format string, v ...interface{})

func (NullLogger) Error

func (n NullLogger) Error(msg string)

func (NullLogger) Errorf

func (n NullLogger) Errorf(format string, v ...interface{})

func (NullLogger) Infof

func (n NullLogger) Infof(format string, v ...interface{})

func (NullLogger) Panicf

func (n NullLogger) Panicf(format string, v ...interface{})

func (NullLogger) Print

func (n NullLogger) Print(v ...interface{})

type ZapLogger

type ZapLogger struct {
	*zap.Logger
}

func NewZapLogger

func NewZapLogger(project string, isPrd bool, opt ...zap.Option) (*ZapLogger, func())

func (*ZapLogger) ContextDebugf

func (z *ZapLogger) ContextDebugf(ctx context.Context, format string, v ...interface{})

func (*ZapLogger) ContextErrorf

func (z *ZapLogger) ContextErrorf(ctx context.Context, format string, v ...interface{})

func (*ZapLogger) ContextInfof

func (z *ZapLogger) ContextInfof(ctx context.Context, format string, v ...interface{})

func (*ZapLogger) ContextPanicf

func (z *ZapLogger) ContextPanicf(ctx context.Context, format string, v ...interface{})

func (*ZapLogger) DebugField

func (z *ZapLogger) DebugField(msg string, fields ...zap.Field)

func (*ZapLogger) Debugf

func (z *ZapLogger) Debugf(format string, v ...interface{})

func (*ZapLogger) Error

func (z *ZapLogger) Error(msg string)

func (*ZapLogger) ErrorField

func (z *ZapLogger) ErrorField(msg string, fields ...zap.Field)

func (*ZapLogger) Errorf

func (z *ZapLogger) Errorf(format string, v ...interface{})

func (*ZapLogger) InfoField

func (z *ZapLogger) InfoField(msg string, fields ...zap.Field)

func (*ZapLogger) Infof

func (z *ZapLogger) Infof(format string, v ...interface{})

func (*ZapLogger) PanicField

func (z *ZapLogger) PanicField(msg string, fields ...zap.Field)

func (*ZapLogger) Panicf

func (z *ZapLogger) Panicf(format string, v ...interface{})

func (*ZapLogger) Print

func (z *ZapLogger) Print(v ...interface{})

func (*ZapLogger) WithContext

func (z *ZapLogger) WithContext(ctx context.Context) *ZapLogger

Jump to

Keyboard shortcuts

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