logger

package
v0.0.0-...-80c8cae Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSysLoggerTag

func GetSysLoggerTag() string

GetSysLoggerTag 生成在 syslog 语句中使用的标记名称。 如果可执行文件被链接,则链接的名称将用作标记,否则,将使用可执行文件的名称。 “gnatsd”是 NATS 服务器的默认值。

Types

type Logger

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

func NewFileLogger

func NewFileLogger(filename string, time, debug, trace, pid bool) *Logger

func NewStdLogger

func NewStdLogger(time, debug, trace, colors, pid bool) *Logger

func (*Logger) Debugf

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

Debugf logs a debug statement

func (*Logger) Errorf

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

Errorf logs an error statement

func (*Logger) Fatalf

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

Fatalf logs a fatal error

func (*Logger) Noticef

func (l *Logger) Noticef(format string, v ...interface{})

Noticef logs a notice statement

func (*Logger) Tracef

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

Tracef logs a trace statement

type SysLogger

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

func NewRemoteSysLogger

func NewRemoteSysLogger(fqn string, debug, trace bool) *SysLogger

NewRemoteSysLogger creates a new remote system logger

func NewSysLogger

func NewSysLogger(debug, trace bool) *SysLogger

NewSysLogger creates a new system logger

func (*SysLogger) Debugf

func (l *SysLogger) Debugf(format string, v ...interface{})

Debugf logs a debug statement

func (*SysLogger) Errorf

func (l *SysLogger) Errorf(format string, v ...interface{})

Errorf logs an error statement

func (*SysLogger) Fatalf

func (l *SysLogger) Fatalf(format string, v ...interface{})

Fatalf logs a fatal error

func (*SysLogger) Noticef

func (l *SysLogger) Noticef(format string, v ...interface{})

Noticef logs a notice statement

func (*SysLogger) Tracef

func (l *SysLogger) Tracef(format string, v ...interface{})

Tracef logs a trace statement

Jump to

Keyboard shortcuts

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