Documentation ¶
Index ¶
- type StandardOutput
- type StandardOutputDispatcher
- func (l StandardOutputDispatcher) Debug(msg string)
- func (l StandardOutputDispatcher) Error(msg string)
- func (l StandardOutputDispatcher) Info(msg string)
- func (l StandardOutputDispatcher) Log(message logging.LogMessage)
- func (l StandardOutputDispatcher) LogIf(message logging.LogMessage, shouldLog bool)
- func (l StandardOutputDispatcher) Trace(msg string)
- func (l StandardOutputDispatcher) Warn(msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StandardOutput ¶
type StandardOutput struct { *loggingdecorator.ColoringScheme // contains filtered or unexported fields }
StandardOutput is the implementation of standard output logging
func New ¶
func New() *StandardOutput
New properly creates a new standard output logger initializing its internal state with default values
func (StandardOutput) Log ¶
func (logger StandardOutput) Log(msg logging.LogMessage) error
Log writes the given log message to the standard output using the logger defined format
func (*StandardOutput) WithColoringScheme ¶
func (logger *StandardOutput) WithColoringScheme(scheme *loggingdecorator.ColoringScheme) *StandardOutput
WithColoringScheme sets the coloring scheme and returns the logger itself
func (*StandardOutput) WithFormat ¶
func (logger *StandardOutput) WithFormat(format string) *StandardOutput
WithFormat sets the logger format and returns the logger itself
type StandardOutputDispatcher ¶
type StandardOutputDispatcher struct {
logging.Dispatcher
}
StandardOutputDispatcher is a struct to encapsulate a logging logging.Dispatcher to allow us to add more methods
func NewStandardOutputDispatcher ¶
func NewStandardOutputDispatcher() StandardOutputDispatcher
NewStandardOutputDispatcher creates a new StandardOutputDispatcher by initializing the required fields The new dispatcher has a standard output logger defined
func (StandardOutputDispatcher) Debug ¶
func (l StandardOutputDispatcher) Debug(msg string)
Debug logs a debug message
func (StandardOutputDispatcher) Error ¶
func (l StandardOutputDispatcher) Error(msg string)
Error logs an error message
func (StandardOutputDispatcher) Info ¶
func (l StandardOutputDispatcher) Info(msg string)
Info logs an info message
func (StandardOutputDispatcher) Log ¶
func (l StandardOutputDispatcher) Log(message logging.LogMessage)
Log will log the given message
func (StandardOutputDispatcher) LogIf ¶
func (l StandardOutputDispatcher) LogIf(message logging.LogMessage, shouldLog bool)
LogIf will log the given message only if `shouldLog` argument is `true`
func (StandardOutputDispatcher) Trace ¶
func (l StandardOutputDispatcher) Trace(msg string)
Trace logs a trace message
func (StandardOutputDispatcher) Warn ¶
func (l StandardOutputDispatcher) Warn(msg string)
Warn logs a warn message