xlog

package
v0.0.0-...-75e3292 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// https://unix.superglobalmegacorp.com/Net2/newsrc/sys/syslog.h.html
	LOG_EMERG   = 0 /* system is unusable */
	LOG_ALERT   = 1 /* action must be taken immediately */
	LOG_CRIT    = 2 /* critical conditions */
	LOG_ERR     = 3 /* error conditions */
	LOG_WARNING = 4 /* warning conditions */
	LOG_NOTICE  = 5 /* normal but significant condition */
	LOG_INFO    = 6 /* informational */
	LOG_DEBUG   = 7 /* debug-level messages */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type XLog

type XLog struct {
	// Syslog logger
	SYSLOG *syslog.Writer
	STDOUT *log.Logger
	STDERR *log.Logger

	DEBUG     *bool
	LOG_LEVEL syslog.Priority // LOG_EMERG=0 .. LOG_DEBUG=7
}

func New

func New(daemon_name string) XLog

func (XLog) Alert

func (xl XLog) Alert(message string)

func (XLog) Alertf

func (xl XLog) Alertf(message string, values ...interface{})

func (XLog) Crit

func (xl XLog) Crit(message string)

func (XLog) Critf

func (xl XLog) Critf(message string, values ...interface{})

func (XLog) Critical

func (xl XLog) Critical(message string)

func (XLog) Debug

func (xl XLog) Debug(message string)

Unified log implementation. Less code >> more CPU.

func (XLog) Debugf

func (xl XLog) Debugf(message string, values ...interface{})

func (XLog) Emerg

func (xl XLog) Emerg(message string)

func (XLog) Emergf

func (xl XLog) Emergf(message string, values ...interface{})

func (XLog) Err

func (xl XLog) Err(message string)

func (XLog) Errf

func (xl XLog) Errf(message string, values ...interface{})

func (XLog) Error

func (xl XLog) Error(message string)

func (XLog) Fatal

func (xl XLog) Fatal(message string)

func (XLog) Info

func (xl XLog) Info(message string)

func (XLog) Infof

func (xl XLog) Infof(message string, values ...interface{})

func (XLog) Log

func (xl XLog) Log(severity syslog.Priority, message string)

void: Log to syslog/stdout/stderr, depending on settings

func (XLog) Notice

func (xl XLog) Notice(message string)

func (XLog) Noticef

func (xl XLog) Noticef(message string, values ...interface{})

func (XLog) Warn

func (xl XLog) Warn(message string)

func (XLog) Warnf

func (xl XLog) Warnf(message string, values ...interface{})

func (XLog) Warning

func (xl XLog) Warning(message string)

Jump to

Keyboard shortcuts

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