gone: github.com/proidiot/gone/log Index | Files | Directories

package log

import "github.com/proidiot/gone/log"

Package log provides a logging mechanism designed to have a similar feel to the original syslog calls in C, but with a few extra behaviors that could come in handy. The motivation for this piece is the notion that not only is it vital to make logging as pain-free as possible from the perspective of a developer, but to also defer as many decisions as possible about retention and routing to administrators.

Index

Package Files

doc.go log.go

func Alert Uses

func Alert(m interface{}) error

Alert sends a log message with priority Alert

func Closelog Uses

func Closelog() error

Closelog ends the log session of the global syslogger.Syslogger. Depending on which kind of syslogger.Syslogger the default is set to, this could result in all future Syslog calls creating errors, or it could have practically no effect.

func Crit Uses

func Crit(m interface{}) error

Crit sends a log message with priority Crit

func Critical Uses

func Critical(m interface{}) error

Critical sends a log message with priority Crit

func Debug Uses

func Debug(m interface{}) error

Debug sends a log message with priority Debug

func Emerg Uses

func Emerg(m interface{}) error

Emerg sends a log message with priority Emerg

func Emergency Uses

func Emergency(m interface{}) error

Emergency sends a log message with priority Emerg

func Err Uses

func Err(m interface{}) error

Err sends a log message with priority Err

func Error Uses

func Error(m interface{}) error

Error sends a log message with priority Err

func Info Uses

func Info(m interface{}) error

Info sends a log message with priority Info

func Information Uses

func Information(m interface{}) error

Information sends a log message with priority Info

func Notice Uses

func Notice(m interface{}) error

Notice sends a log message with priority Notice

func Openlog Uses

func Openlog(ident string, o opt.Option, f pri.Priority) error

Openlog allows the global syslogger.Syslogger to be reset with certain explicit initialization values.

func SetSyslogger Uses

func SetSyslogger(s syslogger.Syslogger)

SetSyslogger overwrites the default global syslogger.Syslogger with the one given explicitly.

func Syslog Uses

func Syslog(p pri.Priority, msg interface{}) error

Syslog allows logs to be written to the global syslogger.Syslogger.

func Warn Uses

func Warn(m interface{}) error

Warn sends a log message with priority Warning

func Warning Uses

func Warning(m interface{}) error

Warning sends a log message with priority Warning

Directories

PathSynopsis
mask
opt
pri
syslogger

Package log imports 6 packages (graph) and is imported by 6 packages. Updated 2018-01-26. Refresh now. Tools for package owners.