log

package
v0.0.0-...-28b5f68 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, params ...interface{})

Debug prints a debug message. If syslog is enabled then LOG_NOTICE is used

func Error

func Error(msg string, params ...interface{})

Error prints an error message. If syslog is enabled then LOG_ERR is used

func Fatal

func Fatal(msg string, params ...interface{})

Fatal logs Error and exits 1

func GetCollectorLogger

func GetCollectorLogger() kitlog.Logger

func InitSyslog

func InitSyslog() (err error)

InitSyslog initializes logging to syslog

func SetLevel

func SetLevel(l Level)

SetLevel sets the log level

Types

type CollectorWriter

type CollectorWriter struct {
	// contains filtered or unexported fields
}

CollectorWriter implements io.Writer.

func (CollectorWriter) Write

func (w CollectorWriter) Write(p []byte) (int, error)

Write implements io.Writer.

type Level

type Level int

Level is a log level such a Debug or Error

const (

	// LevelDebug enables debug logging
	LevelDebug Level = iota
	// LevelError enables error logging
	LevelError Level = iota
)

Jump to

Keyboard shortcuts

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