Documentation
¶
Overview ¶
Package logger provides logging facilities for the NATS server
Package logger provides logging facilities for the NATS server
Index ¶
- func GetSysLoggerTag() string
- type Logger
- type StdLogLogger
- func (l *StdLogLogger) Debugf(format string, v ...interface{})
- func (l *StdLogLogger) Errorf(format string, v ...interface{})
- func (l *StdLogLogger) Fatalf(format string, v ...interface{})
- func (l *StdLogLogger) Noticef(format string, v ...interface{})
- func (l *StdLogLogger) Tracef(format string, v ...interface{})
- type SysLogger
- func (l *SysLogger) Debugf(format string, v ...interface{})
- func (l *SysLogger) Errorf(format string, v ...interface{})
- func (l *SysLogger) Fatalf(format string, v ...interface{})
- func (l *SysLogger) Noticef(format string, v ...interface{})
- func (l *SysLogger) Tracef(format string, v ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSysLoggerTag ¶ added in v0.8.0
func GetSysLoggerTag() string
GetSysLoggerTag generates the tag name for use in syslog statements. If the executable is linked, the name of the link will be used as the tag, otherwise, the name of the executable is used. "gnatsd" is the default for the NATS server.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is the server logger
func NewFileLogger ¶
NewFileLogger creates a logger with output directed to a file
func NewStdLogger ¶
NewStdLogger creates a logger with output directed to Stderr
type StdLogLogger ¶ added in v0.9.9
type StdLogLogger struct {
// contains filtered or unexported fields
}
StdLogLogger assists with embedding gnatsd by providing an implementation of the interface need to call server.SetLogger() and still log to the Go standard library's log.
func NewStdLogLogger ¶ added in v0.9.9
func NewStdLogLogger(time, debug, trace, colors, pid bool, flags int) *StdLogLogger
NewStdLogLogger sends log output to the standard lib log.std Logger
func (*StdLogLogger) Debugf ¶ added in v0.9.9
func (l *StdLogLogger) Debugf(format string, v ...interface{})
Debugf logs a debug statement
func (*StdLogLogger) Errorf ¶ added in v0.9.9
func (l *StdLogLogger) Errorf(format string, v ...interface{})
Errorf logs an error statement
func (*StdLogLogger) Fatalf ¶ added in v0.9.9
func (l *StdLogLogger) Fatalf(format string, v ...interface{})
Fatalf logs a fatal error
func (*StdLogLogger) Noticef ¶ added in v0.9.9
func (l *StdLogLogger) Noticef(format string, v ...interface{})
Noticef logs a notice statement
func (*StdLogLogger) Tracef ¶ added in v0.9.9
func (l *StdLogLogger) Tracef(format string, v ...interface{})
Tracef logs a trace statement
type SysLogger ¶
type SysLogger struct {
// contains filtered or unexported fields
}
SysLogger provides a system logger facility
func NewRemoteSysLogger ¶
NewRemoteSysLogger creates a new remote system logger
func NewSysLogger ¶
NewSysLogger creates a new system logger