Version: v1.0.1 Latest Latest

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

Go to latest
Published: May 31, 2020 License: MIT Imports: 3 Imported by: 0


Rendered for js/wasm


Package power is a more powered logger but with fmt (fat)



This section is empty.


This section is empty.


This section is empty.


type Logger

type Logger struct {
	// contains filtered or unexported fields

Logger fat wrapper of simple logger

func New

func New(l *logger.Logger) Logger

New creates new enriched logger

func (Logger) Debug

func (l Logger) Debug(msg string)

Debug prints message with debug level

func (Logger) Debugf

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

Debugf prints formatted message with debug level

func (Logger) Error

func (l Logger) Error(msg string)

Error prints message with error level

func (Logger) Errorf

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

Errorf prints formatted message with error level

func (Logger) Info

func (l Logger) Info(msg string)

Info prints message with info level

func (Logger) Infof

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

Infof prints formatted message with info level

func (Logger) Trace

func (l Logger) Trace()

Trace prints stacktrace

func (Logger) Warn

func (l Logger) Warn(msg string)

Warn prints message with warning level

func (Logger) Warnf

func (l Logger) Warnf(format string, args ...interface{})

Warnf prints formatted message with warning level

func (Logger) WithErr

func (l Logger) WithErr(key string, err error) Logger

WithErr append error to field list with custom key

func (Logger) WithError

func (l Logger) WithError(err error) Logger

WithError append error to field list with "error" key

func (Logger) WithField

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

WithField tries to convert value to JS type and if it not passible write it like a WithValue

func (Logger) WithFields

func (l Logger) WithFields(fields map[string]interface{}) Logger

WithFields appends fields set to list use only base types: nil, bool, integers, floats, string

func (Logger) WithValue

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

WithValue appends any typed param to field list in Go-syntax representation (%#v) fmt format

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL