logruslog

package
v3.14.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 104

Documentation

Index

Constants

View Source
const DefaultLoggerLevel = "INFO"
View Source
const RootLoggerName = "ROOT"

Variables

This section is empty.

Functions

func Init

func Init()

func NewDefaultLogger

func NewDefaultLogger(logLevelValue string) *log.Logger

Initialize a logger with string value of level

func SetLogLevelByString

func SetLogLevelByString(logLevelValue string)

Sets log level by various string

"debug", "Debug", "DEBUG" "info", "Info", "INFO" "warn", "Warn", "WARN" "error", "Error", "ERROR" "fatal", "Fatal", "FATAL" "panic", "Panic", "PANIC"

Otherwise, use **INFO** level

Types

type LoggerFactory

type LoggerFactory struct {
	LoggerLevels LoggerLevelMapping
}

func (*LoggerFactory) GetLogger

func (factory *LoggerFactory) GetLogger(name string) *log.Logger

Gets logger with pre-configured level

type LoggerLevelMapping

type LoggerLevelMapping map[string]string

Mapping between logger name and level

Jump to

Keyboard shortcuts

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