Documentation ¶
Index ¶
- Variables
- func NewNullLogger() logging.Logger
- type BareBonesLogger
- func (bbl *BareBonesLogger) Debug(message interface{})
- func (bbl *BareBonesLogger) Error(message interface{})
- func (bbl *BareBonesLogger) Info(message interface{})
- func (bbl *BareBonesLogger) Initialise()
- func (bbl *BareBonesLogger) LogAtLevel(logLevel logging.Level, message interface{})
- func (bbl *BareBonesLogger) LogAtLevelWithAttributes(logLevel logging.Level, logAttributes attributes.Attributes)
- func (bbl *BareBonesLogger) Warn(message interface{})
- func (bbl *BareBonesLogger) WithFormatter(formatter logging.Formatter) *BareBonesLogger
- type Builder
- func (builder *Builder) Build() (logging.Logger, error)
- func (builder *Builder) ForBareBonesLogHandler() *Builder
- func (builder *Builder) ForDefaultLogHandler() *Builder
- func (builder *Builder) ForNativeLibraryLogHandler() *Builder
- func (builder *Builder) WithFormatter(formatter logging.Formatter) *Builder
- func (builder *Builder) WithLogLevelDestination(logLevel logging.Level, destination logging.Destination) *Builder
- func (builder *Builder) WithName(name string) *Builder
- type ContainedLogger
- type LoggerBase
- func (lb *LoggerBase) BeingDiscarded(logLevel logging.Level) bool
- func (lb *LoggerBase) Destinations() *logging.Destinations
- func (lb *LoggerBase) Formatter() logging.Formatter
- func (lb *LoggerBase) Name() string
- func (lb *LoggerBase) Override(logLevel logging.Level, destination logging.Destination)
- func (lb *LoggerBase) SetDestinations(destinations *logging.Destinations)
- func (lb *LoggerBase) SetFormatter(formatter logging.Formatter)
- func (lb *LoggerBase) SetName(name string)
- func (lb *LoggerBase) SupportsLogLevel(logLevel logging.Level) bool
- type NativeLibraryLogger
- func (nll *NativeLibraryLogger) Debug(message interface{})
- func (nll *NativeLibraryLogger) Error(message interface{})
- func (nll *NativeLibraryLogger) Info(message interface{})
- func (nll *NativeLibraryLogger) Initialise()
- func (nll *NativeLibraryLogger) LogAtLevel(logLevel logging.Level, message interface{})
- func (nll *NativeLibraryLogger) LogAtLevelWithAttributes(logLevel logging.Level, logAttributes attributes.Attributes)
- func (nll *NativeLibraryLogger) Override(logLevel logging.Level, destination logging.Destination)
- func (nll *NativeLibraryLogger) Warn(message interface{})
- func (nll *NativeLibraryLogger) WithFormatter(formatter logging.Formatter) *NativeLibraryLogger
- type NullLogger
- func (handler *NullLogger) BeingDiscarded(logLevel logging.Level) bool
- func (handler *NullLogger) Debug(message interface{})
- func (handler *NullLogger) Destinations() *logging.Destinations
- func (handler *NullLogger) Error(message interface{})
- func (handler *NullLogger) Formatter() logging.Formatter
- func (handler *NullLogger) Info(message interface{})
- func (handler *NullLogger) Initialise()
- func (handler *NullLogger) IsDefault() bool
- func (handler *NullLogger) LogAtLevel(logLevel logging.Level, message interface{})
- func (handler *NullLogger) LogAtLevelWithAttributes(logLevel logging.Level, attributes attributes.Attributes)
- func (handler *NullLogger) Name() string
- func (handler *NullLogger) Override(logLevel logging.Level, destination logging.Destination)
- func (handler *NullLogger) SetAsDefault(isDefault bool)
- func (handler *NullLogger) SetDestinations(*logging.Destinations)
- func (handler *NullLogger) SetFormatter(formatter logging.Formatter)
- func (handler *NullLogger) SetName(name string)
- func (handler *NullLogger) SupportsLogLevel(logLevel logging.Level) bool
- func (handler *NullLogger) Warn(message interface{})
- type Type
Constants ¶
This section is empty.
Variables ¶
var DefaultTestingAnnealingObserver = buildDefaultTestingAnnealingObserver()
var DefaultTestingEventNotifier = buildTestingEventNotifier()
var DefaultTestingLogger = buildTestingLogger()
var NullTestingEventNotifier = buildNullTestingEventNotifier()
Functions ¶
func NewNullLogger ¶
Types ¶
type BareBonesLogger ¶
type BareBonesLogger struct {
LoggerBase
}
func (*BareBonesLogger) Debug ¶
func (bbl *BareBonesLogger) Debug(message interface{})
func (*BareBonesLogger) Error ¶
func (bbl *BareBonesLogger) Error(message interface{})
func (*BareBonesLogger) Info ¶
func (bbl *BareBonesLogger) Info(message interface{})
func (*BareBonesLogger) Initialise ¶
func (bbl *BareBonesLogger) Initialise()
func (*BareBonesLogger) LogAtLevel ¶
func (bbl *BareBonesLogger) LogAtLevel(logLevel logging.Level, message interface{})
func (*BareBonesLogger) LogAtLevelWithAttributes ¶
func (bbl *BareBonesLogger) LogAtLevelWithAttributes(logLevel logging.Level, logAttributes attributes.Attributes)
func (*BareBonesLogger) Warn ¶
func (bbl *BareBonesLogger) Warn(message interface{})
func (*BareBonesLogger) WithFormatter ¶
func (bbl *BareBonesLogger) WithFormatter(formatter logging.Formatter) *BareBonesLogger
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a fluent constructor of a Logger, allowing the caller to specify various formatters and log-level destinations to best suit their needs.
func (*Builder) Build ¶
Build instructs Builder to finalise building its Logger, and return it to he caller.
func (*Builder) ForBareBonesLogHandler ¶
ForNativeLibraryLogHandler instructs Builder to use the native built-in go library wrapper as its Logger
func (*Builder) ForDefaultLogHandler ¶
func (*Builder) ForNativeLibraryLogHandler ¶
ForNativeLibraryLogHandler instructs Builder to use the native built-in go library wrapper as its Logger
func (*Builder) WithFormatter ¶
WithFormatter instructs Builder to ensure that the Logger constructed will use formatter for its log entry formatters. If not called, the default NullFormatter will be used.
func (*Builder) WithLogLevelDestination ¶
func (builder *Builder) WithLogLevelDestination(logLevel logging.Level, destination logging.Destination) *Builder
WithLogLevelDestination instructs Builder to override the existing Destinations with a new destination for the given logLevel.
type ContainedLogger ¶
type ContainedLogger struct {
// contains filtered or unexported fields
}
ContainedLogger is a struct offering a default container implementation of a Log Handler
func (*ContainedLogger) LogHandler ¶
func (c *ContainedLogger) LogHandler() logging.Logger
func (*ContainedLogger) SetLogHandler ¶
func (c *ContainedLogger) SetLogHandler(logHandler logging.Logger)
type LoggerBase ¶
type LoggerBase struct {
// contains filtered or unexported fields
}
LoggerBase is a base struct that implements default behaviour that matches the Logger interface
func (*LoggerBase) BeingDiscarded ¶
func (lb *LoggerBase) BeingDiscarded(logLevel logging.Level) bool
func (*LoggerBase) Destinations ¶
func (lb *LoggerBase) Destinations() *logging.Destinations
func (*LoggerBase) Formatter ¶
func (lb *LoggerBase) Formatter() logging.Formatter
func (*LoggerBase) Name ¶
func (lb *LoggerBase) Name() string
func (*LoggerBase) Override ¶
func (lb *LoggerBase) Override(logLevel logging.Level, destination logging.Destination)
func (*LoggerBase) SetDestinations ¶
func (lb *LoggerBase) SetDestinations(destinations *logging.Destinations)
SetDestinations allows a pre-defined Destinations instance to be assigned, and subsequently used for log destination stream resolution.
func (*LoggerBase) SetFormatter ¶
func (lb *LoggerBase) SetFormatter(formatter logging.Formatter)
SetFormatter tells the LoggerBase to use the supplied formatter for preparing a given log entry for writing to its final LogLevelDestination
func (*LoggerBase) SetName ¶
func (lb *LoggerBase) SetName(name string)
SetName allows a human-friendly name to be assigned to the loghandler to make it easier to configure
func (*LoggerBase) SupportsLogLevel ¶
func (lb *LoggerBase) SupportsLogLevel(logLevel logging.Level) bool
type NativeLibraryLogger ¶
type NativeLibraryLogger struct { LoggerBase // contains filtered or unexported fields }
func (*NativeLibraryLogger) Debug ¶
func (nll *NativeLibraryLogger) Debug(message interface{})
func (*NativeLibraryLogger) Error ¶
func (nll *NativeLibraryLogger) Error(message interface{})
func (*NativeLibraryLogger) Info ¶
func (nll *NativeLibraryLogger) Info(message interface{})
func (*NativeLibraryLogger) Initialise ¶
func (nll *NativeLibraryLogger) Initialise()
func (*NativeLibraryLogger) LogAtLevel ¶
func (nll *NativeLibraryLogger) LogAtLevel(logLevel logging.Level, message interface{})
func (*NativeLibraryLogger) LogAtLevelWithAttributes ¶
func (nll *NativeLibraryLogger) LogAtLevelWithAttributes(logLevel logging.Level, logAttributes attributes.Attributes)
func (*NativeLibraryLogger) Override ¶
func (nll *NativeLibraryLogger) Override(logLevel logging.Level, destination logging.Destination)
func (*NativeLibraryLogger) Warn ¶
func (nll *NativeLibraryLogger) Warn(message interface{})
func (*NativeLibraryLogger) WithFormatter ¶
func (nll *NativeLibraryLogger) WithFormatter(formatter logging.Formatter) *NativeLibraryLogger
type NullLogger ¶
type NullLogger struct{}
func (*NullLogger) BeingDiscarded ¶
func (handler *NullLogger) BeingDiscarded(logLevel logging.Level) bool
func (*NullLogger) Debug ¶
func (handler *NullLogger) Debug(message interface{})
func (*NullLogger) Destinations ¶
func (handler *NullLogger) Destinations() *logging.Destinations
func (*NullLogger) Error ¶
func (handler *NullLogger) Error(message interface{})
func (*NullLogger) Formatter ¶
func (handler *NullLogger) Formatter() logging.Formatter
func (*NullLogger) Info ¶
func (handler *NullLogger) Info(message interface{})
func (*NullLogger) Initialise ¶
func (handler *NullLogger) Initialise()
func (*NullLogger) IsDefault ¶
func (handler *NullLogger) IsDefault() bool
func (*NullLogger) LogAtLevel ¶
func (handler *NullLogger) LogAtLevel(logLevel logging.Level, message interface{})
func (*NullLogger) LogAtLevelWithAttributes ¶
func (handler *NullLogger) LogAtLevelWithAttributes(logLevel logging.Level, attributes attributes.Attributes)
func (*NullLogger) Name ¶
func (handler *NullLogger) Name() string
func (*NullLogger) Override ¶
func (handler *NullLogger) Override(logLevel logging.Level, destination logging.Destination)
func (*NullLogger) SetAsDefault ¶
func (handler *NullLogger) SetAsDefault(isDefault bool)
func (*NullLogger) SetDestinations ¶
func (handler *NullLogger) SetDestinations(*logging.Destinations)
func (*NullLogger) SetFormatter ¶
func (handler *NullLogger) SetFormatter(formatter logging.Formatter)
func (*NullLogger) SetName ¶
func (handler *NullLogger) SetName(name string)
func (*NullLogger) SupportsLogLevel ¶
func (handler *NullLogger) SupportsLogLevel(logLevel logging.Level) bool
func (*NullLogger) Warn ¶
func (handler *NullLogger) Warn(message interface{})