syslog

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

syslog 方式记录日志

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSyslogger

func NewSyslogger(ctx context.Context, maxLevel logger.Level, addr string) logger.Logger

Types

type SysLogger

type SysLogger struct {
	*syslog.Logger

	MaxLevel logger.Level
	// contains filtered or unexported fields
}

func (*SysLogger) CanLog

func (l *SysLogger) CanLog(level logger.Level) bool

CanLog check level can be logged

func (*SysLogger) Log

func (l *SysLogger) Log(level logger.Level, format string, params ...any)

Log log by level

func (*SysLogger) LogAlter

func (l *SysLogger) LogAlter(format string, params ...any)

LogAlter log by Alter

func (*SysLogger) LogCrit

func (l *SysLogger) LogCrit(format string, params ...any)

LogCrit log by Crit

func (*SysLogger) LogDebug

func (l *SysLogger) LogDebug(format string, params ...any)

LogDebug log by debug

func (*SysLogger) LogEmerg

func (l *SysLogger) LogEmerg(format string, params ...any)

LogEmerg log by emerg

func (*SysLogger) LogError

func (l *SysLogger) LogError(format string, params ...any)

LogError log by error

func (*SysLogger) LogInfo

func (l *SysLogger) LogInfo(format string, params ...any)

LogInfo log by info

func (*SysLogger) LogNotice

func (l *SysLogger) LogNotice(format string, params ...any)

LogNotice log by notice

func (*SysLogger) LogWarning

func (l *SysLogger) LogWarning(format string, params ...any)

LogWarning log by warning

func (*SysLogger) SetAddr

func (l *SysLogger) SetAddr(addr string)

Jump to

Keyboard shortcuts

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