log

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 5 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(a ...interface{})

Debug writes the given input to syslog (sev=LOG_DEBUG) if snap `debug` configuration option is set to `true`. It formats similar to fmt.Sprint

func Debugf

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

Debugf writes the given input to syslog (sev=LOG_DEBUG) if snap `debug` configuration option is set to `true`. It formats similar to fmt.Sprintf

func Error

func Error(a ...interface{})

Error writes the given input to syslog (sev=LOG_ERROR). It formats similar to fmt.Sprint

func Errorf

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

Errorf writes the given input to syslog (sev=LOG_ERROR). It formats similar to fmt.Sprintf

func Fatal

func Fatal(a ...interface{})

Fatal calls Error followed by os.Exit(1). It formats similar to fmt.Sprint

func Fatalf

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

Fatalf calls Errorf followed by os.Exit(1). It formats similar to fmt.Sprintf

func Info

func Info(a ...interface{})

Info writes the given input to syslog (sev=LOG_INFO). It formats similar to fmt.Sprint

func Infof

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

Infof writes the given input to syslog (sev=LOG_INFO). It formats similar to fmt.Sprintf

func Init

func Init()

func SetComponentName

func SetComponentName(component string)

SetComponentName adds a component name to syslog tag as "my-snap.<component>" The default tag is just "my-snap", read from the snap environment. This function is NOT thread-safe. It should not be called concurrently with the other logging functions of this package.

func Warn

func Warn(a ...interface{})

Warn writes the given input to syslog (sev=LOG_WARNING). It formats similar to fmt.Sprint

func Warnf

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

Warnf writes the given input to syslog (sev=LOG_WARNING). It formats similar to fmt.Sprintf

Types

This section is empty.

Jump to

Keyboard shortcuts

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