logging

package
v0.0.0-...-d769a67 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CeeFormatter

func CeeFormatter(p syslog.Priority, hostname, tag, content string) string

This srslog formatter is based on srslog/formatter.go's RFC3164Formatter. The default rsyslog input module expects RFC3164 formatted logs, using srslog's DefaultFormatter with "@cee:" wasn't

compatible enough to get it working.

some historical context on the efforts to standardize the syslog message

format(s): https://www.rsyslog.com/doc/syslog_parsing.html

func GetLogFormatter

func GetLogFormatter(logFormatterType string) logrus.Formatter

func Log

func Log(message string, force bool, isError bool, err interface{})

func LogError

func LogError(message string, errMsg interface{})

func LogStd

func LogStd(message string, force bool)

Types

type Logging

type Logging interface {
	Connect() bool
	ShipEvents(map[string]interface{}, string)
}

func NewLogging

func NewLogging(SyslogServerFlag string, SysLogProtocolFlag string, LogFormatterFlag string, certP string, DebugFlag bool, skipSSLFlag bool) Logging

type LoggingLogrus

type LoggingLogrus struct {
	Logger *logrus.Logger
	// contains filtered or unexported fields
}

func (*LoggingLogrus) Connect

func (l *LoggingLogrus) Connect() bool

func (*LoggingLogrus) ShipEvents

func (l *LoggingLogrus) ShipEvents(eventFields map[string]interface{}, Message string)

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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