kit: Index | Files

package syslog

import ""


Package Files


func NewSyslogLogger Uses

func NewSyslogLogger(w SyslogWriter, newLogger func(io.Writer) log.Logger, options ...Option) log.Logger

NewSyslogLogger returns a new Logger which writes to syslog in syslog format. The body of the log message is the formatted output from the Logger returned by newLogger.

type Option Uses

type Option func(*syslogLogger)

Option sets a parameter for syslog loggers.

func PrioritySelectorOption Uses

func PrioritySelectorOption(selector PrioritySelector) Option

PrioritySelectorOption sets priority selector function to choose syslog priority.

type PrioritySelector Uses

type PrioritySelector func(keyvals ...interface{}) gosyslog.Priority

PrioritySelector inspects the list of keyvals and selects a syslog priority.

type SyslogWriter Uses

type SyslogWriter interface {
    Write([]byte) (int, error)
    Close() error
    Emerg(string) error
    Alert(string) error
    Crit(string) error
    Err(string) error
    Warning(string) error
    Notice(string) error
    Info(string) error
    Debug(string) error

SyslogWriter is an interface wrapping stdlib syslog Writer.

Package syslog imports 6 packages (graph). Updated 2018-12-26. Refresh now. Tools for package owners.