log

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSyslogHook

func CreateSyslogHook(cfg *LoggingConfig) (logrus.Hook, error)

func Init

func Init(cfg *LoggingConfig) error

Types

type LoggingConfig

type LoggingConfig struct {
	Formatter logrus.Formatter
	Level     logrus.Level
	Syslog    *SyslogConfig
}

func NewLoggingConfig

func NewLoggingConfig() *LoggingConfig

type SyslogConfig

type SyslogConfig struct {
	Network  string
	RAddr    string
	Tag      string
	Priority syslog.Priority
}

type TextFormatter

type TextFormatter struct {
	// TimestampFormat is the format used to print the timestamp.  By default
	// an RFC3339 timestamp is used.
	TimestampFormat string
}

func NewTextFormatter

func NewTextFormatter() *TextFormatter

NewTextFormatter returns a text formatter

func (*TextFormatter) Format

func (f *TextFormatter) Format(entry *logrus.Entry) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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