logger

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: MIT Imports: 4 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 {
	// contains filtered or unexported fields
}

Logger is the struct that outputs colored log with namespace.

func WithNamespace

func WithNamespace(ns string) *Logger

func (*Logger) AddNamespace

func (l *Logger) AddNamespace(ns string)

AddNamespace() adds more namespace string on output log.

func (*Logger) Error

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

Error() outputs error log with red color.

func (*Logger) Errorf

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

Errorf() outputs formatted error log with red color.

func (*Logger) Info

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

Info() outputs information log with green color.

func (*Logger) Infof

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

Infof() outputs formatted information log with green color.

func (*Logger) Print

func (l *Logger) Print(message ...interface{})

Print() outputs log with default color.

func (*Logger) Printf

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

Printf() outputs formatted log with default color.

func (*Logger) RemoveNamespace

func (l *Logger) RemoveNamespace(ns string)

func (*Logger) Warn

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

Warn() outputs warning log with yellow color.

func (*Logger) Warnf

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

Warnf() outputs formatted warning log with yellow color.

Jump to

Keyboard shortcuts

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