message

package
Version: v0.0.0-...-9f614e9 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2015 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Facility

type Facility int
const (
	FacilityUnknown Facility = -1
	Kernel          Facility = 0
	User            Facility = 1
	Mail            Facility = 2
	Sysdaemon       Facility = 3
	Secauth         Facility = 4
	Syslogd         Facility = 5
	Lineprinter     Facility = 6
	Netnews         Facility = 7
	Uucp            Facility = 8
	Clock           Facility = 9
	Secauth2        Facility = 10
	Ftp             Facility = 11
	Ntp             Facility = 12
	Logaudit        Facility = 13
	Logalert        Facility = 14
	Clock2          Facility = 15
	Local0          Facility = 16
	Local1          Facility = 17
	Local2          Facility = 18
	Local3          Facility = 19
	Local4          Facility = 20
	Local5          Facility = 21
	Local6          Facility = 22
	Local7          Facility = 23
)

func (Facility) String

func (self Facility) String() string

type IMessage

type IMessage interface {
	RawMessage() *[]byte
	TimeStamp() time.Time
	/* Common sense says that the pid should be an int, but in practice that would require
	   taking the string the syslogparser module gives, converting it to an int, and
	   then converting it into a string as that's how it's stored in the attributes map.
	   tl/dr - using int would result in string->int->string conversion on each message. */
	Pid() string
	Facility() Facility
	Severity() Severity
	Process() string
	Hostname() string
	Message() string
}

type Severity

type Severity int
const (
	SeverityUnknown Severity = -1
	Emergency       Severity = 0
	Alert           Severity = 1
	Critical        Severity = 2
	Error           Severity = 3
	Warning         Severity = 4
	Notice          Severity = 5
	Info            Severity = 6
	Debug           Severity = 7
)

func (Severity) String

func (self Severity) String() string

type UnparsableMessage

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

func NewUnparsableMessage

func NewUnparsableMessage(rawMsg *[]byte) *UnparsableMessage

func (*UnparsableMessage) Facility

func (self *UnparsableMessage) Facility() Facility

func (*UnparsableMessage) Hostname

func (self *UnparsableMessage) Hostname() string

func (*UnparsableMessage) Message

func (self *UnparsableMessage) Message() string

func (*UnparsableMessage) Pid

func (self *UnparsableMessage) Pid() string

func (*UnparsableMessage) Process

func (self *UnparsableMessage) Process() string

func (*UnparsableMessage) RawMessage

func (self *UnparsableMessage) RawMessage() *[]byte

SD-248: default values to should conform to RFC

func (*UnparsableMessage) Severity

func (self *UnparsableMessage) Severity() Severity

func (*UnparsableMessage) TimeStamp

func (self *UnparsableMessage) TimeStamp() time.Time

Jump to

Keyboard shortcuts

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