logging

package
v0.0.0-...-ec5fd6c Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

func Debugf(format string, a ...interface{})

Debugf prints logging if logging level >= debug

func Errorf

func Errorf(format string, a ...interface{}) error

Errorf prints logging if logging level >= error

func Panicf

func Panicf(format string, a ...interface{})

Panicf prints logging plus stack trace. This should be used only for unrecoverble error

func SetLogFile

func SetLogFile(filename string)

SetLogFile sets logging file

func SetLogLevel

func SetLogLevel(levelStr string)

SetLogLevel sets logging level

func SetLogStderr

func SetLogStderr(enable bool)

SetLogStderr sets flag for logging stderr output

func Verbosef

func Verbosef(format string, a ...interface{})

Verbosef prints logging if logging level >= verbose

Types

type Level

type Level uint32

Level type

const (
	PanicLevel Level = iota
	ErrorLevel
	VerboseLevel
	DebugLevel
	MaxLevel
	UnknownLevel
)

PanicLevel...MaxLevel indicates the logging level

func GetLoggingLevel

func GetLoggingLevel() Level

GetLoggingLevel gets current logging level

func (Level) String

func (l Level) String() string

Jump to

Keyboard shortcuts

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