logging

package
v0.0.0-...-de30e9e Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2017 License: BSD-3-Clause Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LogDebug    = iota // LogDebug defines debug log level.
	LogInfo            // LogInfo defines info log level.
	LogWarn            // LogWarn defines warn log level.
	LogError           // LogError defines error log level.
	LogFatal           // LogFatal defines fatal log level.
	LogPanic           // LogPanic defines panic log level.
	LogDisabled        // LogDisabled disables the logger.
)

Variables

This section is empty.

Functions

func CreateDecor

func CreateDecor(lc log.Context) decorator.Decorator

CreateDecor creates a decorator that adds the passed in Logger into the request context map for future use

func NewContext

func NewContext(w io.Writer) log.Context

func NewContextWithTimestamp

func NewContextWithTimestamp(w io.Writer) log.Context

func NewLogger

func NewLogger(w io.Writer) log.Logger

func NewLoggerWithTimestamp

func NewLoggerWithTimestamp(w io.Writer) log.Logger

func SetGlobalLevel

func SetGlobalLevel(level LogLevel)

SetGlobalLevel sets the global log level. Refer to logger_test for details of each usecases.

Types

type LogLevel

type LogLevel uint8

type LogObj

type LogObj map[string]interface{}

LogObj or the composite of it that can be passed to Log.Print(), and e.Interface() functions.

Jump to

Keyboard shortcuts

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