syslog

package
v2.4.7 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Vendor  string
	Product string
	Version string
)

Functions

func BuildExtension

func BuildExtension(m map[string]interface{}) string

func Close

func Close() error

func Debug

func Debug(msg Msg) error

func Error

func Error(msg Msg) error

func Fatal

func Fatal(msg Msg) error

func Info

func Info(msg Msg) error

func Init

func Init(cfg Config) error

func Panic

func Panic(msg Msg) error

func Reload

func Reload(cfg Config) error

func Warn

func Warn(msg Msg) error

func WithLevel

func WithLevel(level srslog.Priority, msg Msg) error

Types

type AddrConfig

type AddrConfig struct {
	Network string // "udp", "tcp" или "unix"
	Addr    string // "host:port" или "/dev/log"
}

type Config

type Config struct {
	Level zerolog.Level
	Addrs []AddrConfig
}

type Msg

type Msg struct {
	Signature    string
	Severity     int
	Message      string
	Extension    string
	ExtensionMap map[string]interface{}
}

type Writer

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

func (*Writer) Write

func (w *Writer) Write(level srslog.Priority, msg Msg) error

func (*Writer) WriteContext

func (w *Writer) WriteContext(ctx context.Context, level srslog.Priority, msg Msg) error

Jump to

Keyboard shortcuts

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