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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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