syslog

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugVerbosity
	TraceVerbosity
)

Variables

This section is empty.

Functions

func DebugTf

func DebugTf(tag, format string, a ...interface{}) error

func Debugf

func Debugf(format string, a ...interface{}) error

func ErrorTf

func ErrorTf(tag, format string, a ...interface{}) error

func Errorf

func Errorf(format string, a ...interface{}) error

func FatalTf

func FatalTf(tag, format string, a ...interface{}) error

func Fatalf

func Fatalf(format string, a ...interface{}) error

func InfoTf

func InfoTf(tag, format string, a ...interface{}) error

func Infof

func Infof(format string, a ...interface{}) error

func SetDefaultLogger

func SetDefaultLogger(l *Logger)

func SetSeverity

func SetSeverity(logLevel LogLevel)

func SetVerbosity

func SetVerbosity(verbosity int)

func TraceTf

func TraceTf(tag, format string, a ...interface{}) error

func Tracef

func Tracef(format string, a ...interface{}) error

func VLogTf

func VLogTf(verbosity int, tag, format string, a ...interface{}) error

func VLogf

func VLogf(verbosity int, format string, a ...interface{}) error

func WarnTf

func WarnTf(tag, format string, a ...interface{}) error

func Warnf

func Warnf(format string, a ...interface{}) error

Types

type ErrMsgTooLong

type ErrMsgTooLong struct {
	// Msg is the truncated part of the message.
	Msg string
}

ErrMsgTooLong is returned when a message is truncated.

func (*ErrMsgTooLong) Error

func (e *ErrMsgTooLong) Error() string

type LogInitOptions

type LogInitOptions struct {
	LogSink                                 *logger.LogSinkWithCtxInterface
	LogLevel, MinSeverityForFileAndLineInfo LogLevel
	Tags                                    []string
	Writer                                  io.Writer
}

type LogLevel

type LogLevel int32

func (*LogLevel) Set

func (ll *LogLevel) Set(s string) error

Set implements the flag.Value interface.

func (LogLevel) String

func (ll LogLevel) String() string

type Logger

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

func GetDefaultLogger

func GetDefaultLogger() *Logger

func NewLogger

func NewLogger(options LogInitOptions) (*Logger, error)

func NewLoggerWithDefaults

func NewLoggerWithDefaults(tags ...string) (*Logger, error)

func (*Logger) Close

func (l *Logger) Close() error

func (*Logger) DebugTf

func (l *Logger) DebugTf(tag, format string, a ...interface{}) error

func (*Logger) Debugf

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

func (*Logger) ErrorTf

func (l *Logger) ErrorTf(tag, format string, a ...interface{}) error

func (*Logger) Errorf

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

func (*Logger) FatalTf

func (l *Logger) FatalTf(tag, format string, a ...interface{}) error

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, a ...interface{}) error

func (*Logger) InfoTf

func (l *Logger) InfoTf(tag, format string, a ...interface{}) error

func (*Logger) Infof

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

func (*Logger) SetSeverity

func (l *Logger) SetSeverity(severity diagnostics.Severity)

func (*Logger) SetVerbosity

func (l *Logger) SetVerbosity(verbosity int)

func (*Logger) TraceTf

func (l *Logger) TraceTf(tag, format string, a ...interface{}) error

func (*Logger) Tracef

func (l *Logger) Tracef(format string, a ...interface{}) error

func (*Logger) VLogTf

func (l *Logger) VLogTf(verbosity int, tag, format string, a ...interface{}) error

func (*Logger) VLogf

func (l *Logger) VLogf(verbosity int, format string, a ...interface{}) error

func (*Logger) WarnTf

func (l *Logger) WarnTf(tag, format string, a ...interface{}) error

func (*Logger) Warnf

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

type Writer

type Writer struct {
	*Logger
}

func (*Writer) Write

func (l *Writer) Write(data []byte) (n int, err error)

Jump to

Keyboard shortcuts

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