Documentation ¶
Index ¶
- Constants
- type Logger
- type StanLogger
- func (s *StanLogger) Close() error
- func (s *StanLogger) Debugf(format string, v ...interface{})
- func (s *StanLogger) Errorf(format string, v ...interface{})
- func (s *StanLogger) Fatalf(format string, v ...interface{})
- func (s *StanLogger) GetLogger() Logger
- func (s *StanLogger) Noticef(format string, v ...interface{})
- func (s *StanLogger) ReopenLogFile()
- func (s *StanLogger) SetFileSizeLimit(limit int64)
- func (s *StanLogger) SetLogger(log Logger, logtime, debug, trace bool, logfile string)
- func (s *StanLogger) SetLoggerWithOpts(log Logger, nOpts *natsd.Options, debug, trace bool)
- func (s *StanLogger) SetNATSServer(ns *natsd.Server)
- func (s *StanLogger) Tracef(format string, v ...interface{})
- func (s *StanLogger) UpdateNATSOptions(nOpts *natsd.Options)
- func (s *StanLogger) Warnf(format string, v ...interface{})
Constants ¶
const LogPrefix = "STREAM: "
LogPrefix is prefixed to all NATS Streaming log messages
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
Logger interface for the Streaming project. This is an alias of the NATS Server's Logger interface.
type StanLogger ¶
type StanLogger struct {
// contains filtered or unexported fields
}
StanLogger is the logger used in this project and implements the Logger interface.
func NewStanLogger ¶
func NewStanLogger() *StanLogger
NewStanLogger returns an instance of StanLogger
func (*StanLogger) Close ¶ added in v0.11.0
func (s *StanLogger) Close() error
Close closes this logger, releasing possible held resources.
func (*StanLogger) Debugf ¶
func (s *StanLogger) Debugf(format string, v ...interface{})
Debugf logs a debug statement
func (*StanLogger) Errorf ¶
func (s *StanLogger) Errorf(format string, v ...interface{})
Errorf logs an error
func (*StanLogger) Fatalf ¶
func (s *StanLogger) Fatalf(format string, v ...interface{})
Fatalf logs a fatal error
func (*StanLogger) Noticef ¶
func (s *StanLogger) Noticef(format string, v ...interface{})
Noticef logs a notice statement
func (*StanLogger) ReopenLogFile ¶ added in v0.11.0
func (s *StanLogger) ReopenLogFile()
ReopenLogFile closes and reopen the logfile. Does nothing if the logger is not a file based.
func (*StanLogger) SetFileSizeLimit ¶ added in v0.17.0
func (s *StanLogger) SetFileSizeLimit(limit int64)
SetFileSizeLimit sets the size limit for a logfile DEPRECATED: Use SetLoggerWithOpts instead.
func (*StanLogger) SetLogger ¶
func (s *StanLogger) SetLogger(log Logger, logtime, debug, trace bool, logfile string)
SetLogger sets the logger, debug and trace DEPRECATED: Use SetLoggerWithOpts instead.
func (*StanLogger) SetLoggerWithOpts ¶ added in v0.18.0
func (s *StanLogger) SetLoggerWithOpts(log Logger, nOpts *natsd.Options, debug, trace bool)
SetLoggerWithOpts sets the logger and various options. Note that `debug` and `trace` here are for STAN.
func (*StanLogger) SetNATSServer ¶ added in v0.18.0
func (s *StanLogger) SetNATSServer(ns *natsd.Server)
SetNATSServer allows the logger to have a handle to the embedded NATS Server. This sets the logger for the NATS Server and used during logfile re-opening.
func (*StanLogger) Tracef ¶
func (s *StanLogger) Tracef(format string, v ...interface{})
Tracef logs a trace statement
func (*StanLogger) UpdateNATSOptions ¶ added in v0.18.0
func (s *StanLogger) UpdateNATSOptions(nOpts *natsd.Options)
UpdateNATSOptions refreshes the NATS related options, for instance after a configuration reload, so that if ReopenLogFile() is called, the logger new options are applied.
func (*StanLogger) Warnf ¶ added in v0.12.0
func (s *StanLogger) Warnf(format string, v ...interface{})
Warnf logs a warning statement