logging

package
v0.0.0-...-3d2ccb6 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 6 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 Infof

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

Verbosef prints logging if logging level >= info

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 Warningf

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

Warningf prints logging if logging level >= warning

Types

type Level

type Level uint32

Level type

const (
	ErrorLevel Level = iota
	WarningLevel
	InfoLevel
	DebugLevel
	MaxLevel
	UnknownLevel
)

ErrorLevel...MaxLevel indicates the logging level

func GetLoggingLevel

func GetLoggingLevel() Level

GetLoggingLevel gets current logging level

func (Level) String

func (loglevel Level) String() string

Jump to

Keyboard shortcuts

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