Documentation ¶
Index ¶
- Constants
- type CmdLogger
- func (l *CmdLogger) Command(format string, words ...string)
- func (l *CmdLogger) Debug(format string, words ...string)
- func (l *CmdLogger) Disabled(format string, words ...string)
- func (l *CmdLogger) Error(format string, words ...string)
- func (l *CmdLogger) Exception(err error, format string, words ...string)
- func (l *CmdLogger) Fatal(format string, words ...string)
- func (l *CmdLogger) FatalError(e error, format string, words ...string)
- func (l *CmdLogger) Info(format string, words ...string)
- func (l *CmdLogger) Log(format string, level Level, words ...string)
- func (l *CmdLogger) LogError(message error)
- func (l *CmdLogger) LogHighlight(format string, level Level, highlightColor strcolor.ColorCode, words ...string)
- func (l *CmdLogger) Notice(format string, words ...string)
- func (l *CmdLogger) Success(format string, words ...string)
- func (l *CmdLogger) TaskError(format string, isComplete bool, words ...string)
- func (l *CmdLogger) TaskSuccess(format string, isComplete bool, words ...string)
- func (l *CmdLogger) TaskWarn(format string, words ...string)
- func (l *CmdLogger) Trace(format string, words ...string)
- func (l *CmdLogger) UseCorrelationId(value bool)
- func (l *CmdLogger) UseTimestamp(value bool)
- func (l *CmdLogger) Warn(format string, words ...string)
- type Level
- type Log
- type Logger
- func (l *Logger) AddCmdLogger()
- func (l *Logger) AddCmdLoggerWithTimestamp()
- func (l *Logger) Command(format string, words ...string)
- func (l *Logger) Debug(format string, words ...string)
- func (l *Logger) Disabled(format string, words ...string)
- func (l *Logger) Error(format string, words ...string)
- func (l *Logger) Exception(err error, format string, words ...string)
- func (l *Logger) Fatal(format string, words ...string)
- func (l *Logger) FatalError(e error, format string, words ...string)
- func (l *Logger) Info(format string, words ...string)
- func (l *Logger) Log(format string, level Level, words ...string)
- func (l *Logger) LogError(message error)
- func (l *Logger) LogHighlight(format string, level Level, words ...string)
- func (l *Logger) Notice(format string, words ...string)
- func (l *Logger) Success(format string, words ...string)
- func (l *Logger) TaskError(format string, isComplete bool, words ...string)
- func (l *Logger) TaskSuccess(format string, isComplete bool, words ...string)
- func (l *Logger) TaskWarn(format string, words ...string)
- func (l *Logger) Trace(format string, words ...string)
- func (l *Logger) Warn(format string, words ...string)
- func (l *Logger) WithCorrelationId() *Logger
- func (l *Logger) WithDebug() *Logger
- func (l *Logger) WithTimestamp() *Logger
- func (l *Logger) WithTrace() *Logger
- func (l *Logger) WithWarning() *Logger
- type LoggerOptions
Constants ¶
View Source
const ( SuccessColor = color.FgGreen InfoColor = color.FgHiWhite NoticeColor = color.FgHiCyan WarningColor = color.FgYellow ErrorColor = color.FgRed DebugColor = color.FgMagenta TraceColor = color.FgHiMagenta CommandColor = color.FgBlue DisabledColor = color.FgHiBlack )
Logger Ansi Colors
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdLogger ¶
type CmdLogger struct{}
CmdLogger Command Line Logger implementation
func (*CmdLogger) FatalError ¶
FatalError log message
func (*CmdLogger) LogHighlight ¶
func (l *CmdLogger) LogHighlight(format string, level Level, highlightColor strcolor.ColorCode, words ...string)
LogHighlight Log information message
func (*CmdLogger) TaskSuccess ¶
TaskSuccess log message
func (*CmdLogger) UseCorrelationId ¶ added in v0.0.19
func (*CmdLogger) UseTimestamp ¶ added in v0.0.10
type Log ¶
type Log interface { UseTimestamp(value bool) UseCorrelationId(value bool) Log(format string, level Level, words ...string) LogHighlight(format string, level Level, highlightColor strcolor.ColorCode, words ...string) Info(format string, words ...string) Success(format string, words ...string) TaskSuccess(format string, isComplete bool, words ...string) Warn(format string, words ...string) TaskWarn(format string, words ...string) Command(format string, words ...string) Disabled(format string, words ...string) Notice(format string, words ...string) Debug(format string, words ...string) Trace(format string, words ...string) Error(format string, words ...string) Exception(err error, format string, words ...string) LogError(message error) TaskError(format string, isComplete bool, words ...string) Fatal(format string, words ...string) FatalError(e error, format string, words ...string) }
Log Interface
type Logger ¶
type Logger struct { Loggers []Log LogLevel Level HighlightColor strcolor.ColorCode UseTimestamp bool }
Logger Default structure
func (*Logger) AddCmdLogger ¶
func (l *Logger) AddCmdLogger()
AddCmdLogger Add a command line logger to the system
func (*Logger) AddCmdLoggerWithTimestamp ¶ added in v0.0.10
func (l *Logger) AddCmdLoggerWithTimestamp()
func (*Logger) FatalError ¶
FatalError log message
func (*Logger) LogHighlight ¶
LogHighlight Log information message
func (*Logger) TaskSuccess ¶
TaskSuccess log message
func (*Logger) WithCorrelationId ¶ added in v0.0.19
func (*Logger) WithTimestamp ¶ added in v0.0.19
func (*Logger) WithWarning ¶ added in v0.0.19
type LoggerOptions ¶ added in v0.0.19
type LoggerOptions int64
LogOptions Definition
const ( WithTimestamp LoggerOptions = iota WithCorrelationId )
Click to show internal directories.
Click to hide internal directories.