domain

package
v2.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: OSL-3.0 Imports: 6 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 struct {
	*zap.Logger
}

Logger is a Wrapper for the zap logger fulfilling the flamingo.Logger interface

func (*Logger) Debug

func (l *Logger) Debug(args ...interface{})

Debug logs a message at debug level

func (*Logger) Debugf

func (l *Logger) Debugf(log string, args ...interface{})

Debug logs a message at debug level

func (*Logger) Error

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

Error logs a message at error level

func (*Logger) Fatal

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

Fatal logs a message at fatal level The logger then calls os.Exit(1), even if logging at FatalLevel is disabled.

func (*Logger) Flush

func (l *Logger) Flush()

Flush is used by buffered loggers and triggers the actual writing. It is a good habit to call Flush before letting the process exit. For the top level flamingo.Logger, this is called by the app itself.

func (*Logger) Info

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

Info logs a message at info level

func (*Logger) Panic

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

Panic logs a message at panic level The logger then panics, even if logging at PanicLevel is disabled.

func (*Logger) Warn

func (l *Logger) Warn(args ...interface{})

Warn logs a message at warn level

func (*Logger) WithContext

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

WithContext returns a logger with fields filled from the context businessId: From Header X-Business-ID client_ip: From Header X-Forwarded-For or request if header is empty correlationId: The ID of the context method: HTTP verb from request path: URL path from request referer: referer from request request: received payload from request

func (*Logger) WithCorrelationID

func (l *Logger) WithCorrelationID(cid string) flamingo.Logger

WithCorrelationID returns a logger with a correlation ID field

func (*Logger) WithField

func (l *Logger) WithField(key flamingo.LogKey, value interface{}) flamingo.Logger

WithField creates a child logger and adds structured context to it.

func (*Logger) WithFields

func (l *Logger) WithFields(fields map[flamingo.LogKey]interface{}) flamingo.Logger

WithFields creates a child logger and adds structured context to it.

Jump to

Keyboard shortcuts

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