syslog

package
v0.0.0-...-ea2487c Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: BSD-3-Clause, BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Supported = true

Variables

View Source
var ErrUnsupported = errors.New("syslog is not supported on this platform")

Functions

func New

func New(name string, mods ...Modifier) (logger.Logger, error)

Types

type Flags

type Flags struct {
	Level string
}

func DefaultFlags

func DefaultFlags() *Flags

func (*Flags) Minimum

func (f *Flags) Minimum() (logger.Priority, error)

func (*Flags) Register

func (f *Flags) Register(flags kflags.FlagSet, prefix string) *Flags

type Logger

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

func (*Logger) Debugf

func (l *Logger) Debugf(format string, args ...interface{})

func (*Logger) Enabled

func (l *Logger) Enabled(_ context.Context, level slog.Level) bool

func (*Logger) Errorf

func (l *Logger) Errorf(format string, args ...interface{})

func (*Logger) Handle

func (l *Logger) Handle(_ context.Context, record slog.Record) error

func (*Logger) Infof

func (l *Logger) Infof(format string, args ...interface{})

func (*Logger) SetOutput

func (l *Logger) SetOutput(io.Writer)

func (*Logger) Shutdown

func (l *Logger) Shutdown(ctx context.Context) error

func (*Logger) Warnf

func (l *Logger) Warnf(format string, args ...interface{})

type Modifier

type Modifier func(*options) error

func FromFlags

func FromFlags(flags *Flags) Modifier

func WithMinimum

func WithMinimum(priority logger.Priority) Modifier

type Modifiers

type Modifiers []Modifier

func (Modifiers) Apply

func (mods Modifiers) Apply(options *options) error

Jump to

Keyboard shortcuts

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