logd

package module
v0.0.0-...-729e144 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

README

logd Build Status

Microservices logging framework for systemd

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MachineIdentifier string
	ModuleName        string
	LogDirectory      string
)

Functions

func Configure

func Configure(modulename string, logDirectory string)

Configure sets up the standard logging infrastructure to write to stdout and a local log file The final path of the log file is prefixed with a director path obtained from configuration

func Log

func Log(priority Priority, vars map[string]string, v ...interface{}) error

Log provides the ability to log additional metadata or analytics with a message

func LogFatal

func LogFatal(vars map[string]string, err error)

Types

type JournalWriter

type JournalWriter struct {
	MachineIdentifier string
	ModuleName        string
}

JournalWriter writes log messages to systemd journal

func (JournalWriter) Write

func (w JournalWriter) Write(p []byte) (int, error)

Writes log message to systemd journal

type Priority

type Priority int

Priority of a journal message

const (
	PriEmerg Priority = iota
	PriAlert
	PriCrit
	PriErr
	PriWarning
	PriNotice
	PriInfo
	PriDebug
)

Jump to

Keyboard shortcuts

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