syslog

package
v1.0.0-...-a1efe76 Latest Latest
Warning

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

Go to latest
Published: May 1, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter func(e *log.Entry) string

Formatter is the function used to format the syslog entry

type Syslog

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

Syslog is an instance of the syslog logger

func New

func New(network string, raddr string, priority syslog.Priority, tag string) (*Syslog, error)

New returns a new instance of the syslog logger example: syslog.New("udp", "localhost:514", syslog.LOG_DEBUG, "")

func (*Syslog) DisplayColor

func (s *Syslog) DisplayColor(color bool)

DisplayColor tells Console to output in color or not Default is : true

func (*Syslog) Run

func (s *Syslog) Run() chan<- *log.Entry

Run starts the logger consuming on the returned channed

func (*Syslog) SetANSIReset

func (s *Syslog) SetANSIReset(code log.ANSIEscSeq)

SetANSIReset sets the ANSI Reset sequence

func (*Syslog) SetChannelBuffer

func (s *Syslog) SetChannelBuffer(i uint)

SetChannelBuffer tells Syslog what the channel buffer size should be Default is : 0

func (*Syslog) SetFormatter

func (s *Syslog) SetFormatter(f Formatter)

SetFormatter sets the Syslog entry formatter Default is : defaultFormatEntry

func (*Syslog) SetLevelColor

func (s *Syslog) SetLevelColor(l log.Level, color log.ANSIEscSeq)

SetLevelColor updates Console's level color values

func (*Syslog) SetTimestampFormat

func (s *Syslog) SetTimestampFormat(format string)

SetTimestampFormat sets Console's timestamp output format Default is : time.RFC3339Nano

Jump to

Keyboard shortcuts

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