Back to godoc.org
github.com/proidiot/gone/log

package log

v0.0.0 (1151264)
Latest Go to latest
Published: Jun 8, 2019 | License: GPL3 | Module: github.com/proidiot/gone

Overview

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

func Alert

func Alert(m interface{}) error

Alert sends a log message with priority Alert

func Closelog

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

func Crit(m interface{}) error

Crit sends a log message with priority Crit

func Critical

func Critical(m interface{}) error

Critical sends a log message with priority Crit

func Debug

func Debug(m interface{}) error

Debug sends a log message with priority Debug

func Emerg

func Emerg(m interface{}) error

Emerg sends a log message with priority Emerg

func Emergency

func Emergency(m interface{}) error

Emergency sends a log message with priority Emerg

func Err

func Err(m interface{}) error

Err sends a log message with priority Err

func Error

func Error(m interface{}) error

Error sends a log message with priority Err

func Info

func Info(m interface{}) error

Info sends a log message with priority Info

func Information

func Information(m interface{}) error

Information sends a log message with priority Info

func Notice

func Notice(m interface{}) error

Notice sends a log message with priority Notice

func Openlog

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

func SetSyslogger(s syslogger.Syslogger)

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

func Syslog

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

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

func Warn

func Warn(m interface{}) error

Warn sends a log message with priority Warning

func Warning

func Warning(m interface{}) error

Warning sends a log message with priority Warning

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier