Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NilLoggerError = errors.New("logger is nil")
)
Functions ¶
func FormatDetails ¶ added in v0.6.21
FormatDetails gets the formatted details
func FormatErrors ¶ added in v0.6.21
FormatErrors gets the formatted errors
func FormatStatus ¶ added in v0.6.21
FormatStatus gets the formatted status
Types ¶
type DefaultLogger ¶
DefaultLogger is a logger that logs messages
func NewDefaultLogger ¶
func NewDefaultLogger(name string) *DefaultLogger
NewDefaultLogger creates a new logger
func (*DefaultLogger) FormatLogError ¶ added in v0.6.21
func (d *DefaultLogger) FormatLogError(logError *LogError) string
FormatLogError formats a log error
func (*DefaultLogger) FormatLogMessage ¶ added in v0.6.21
func (d *DefaultLogger) FormatLogMessage(logMessage *LogMessage) string
FormatLogMessage formats a log message
func (*DefaultLogger) LogError ¶ added in v0.6.21
func (d *DefaultLogger) LogError(logError *LogError)
LogError logs an error
func (*DefaultLogger) LogMessage ¶
func (d *DefaultLogger) LogMessage(logMessage *LogMessage)
LogMessage logs a message
type LogError ¶ added in v0.6.21
LogError struct
func NewLogError ¶ added in v0.6.21
NewLogError creates a new log error
type LogMessage ¶ added in v0.6.21
LogMessage struct
func NewLogMessage ¶ added in v0.6.21
func NewLogMessage(title string, status Status, details ...string) *LogMessage
NewLogMessage creates a new log message
func (*LogMessage) String ¶ added in v0.6.21
func (l *LogMessage) String() string
String gets the string representation of a log message
type Logger ¶
type Logger interface { LogMessage(logMessage *LogMessage) LogError(logError *LogError) }
Logger is an interface for logging messages
Click to show internal directories.
Click to hide internal directories.