syslog

package
v0.0.0-...-dad4d3c Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger          Logger
	TimestampFormat string
}

Config is the configuration

type Handler

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

Handler is an instance of the console logger

func New

func New(logger Logger) *Handler

New creates a new console handler

func NewConfig

func NewConfig(config *Config) *Handler

NewConfig creates a handler with a config

func (*Handler) Handle

func (c *Handler) Handle(e *log.Entry)

Handle handles the log entry

type Logger

type Logger interface {
	Alert(m string) error
	Crit(m string) error
	Debug(m string) error
	Emerg(m string) error
	Err(m string) error
	Info(m string) error
	Notice(m string) error
	Warning(m string) error
	Write(p []byte) (n int, err error)
}

Logger writer

Jump to

Keyboard shortcuts

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