Documentation ¶
Index ¶
- type ColorMode
- type ConsoleLogger
- func (cl ConsoleLogger) Prefix() string
- func (cl ConsoleLogger) PrintBytes(data []byte)
- func (cl ConsoleLogger) PrintFailure()
- func (cl ConsoleLogger) PrintSuccess()
- func (cl ConsoleLogger) Printf(format string, args ...interface{})
- func (cl ConsoleLogger) Warnf(format string, args ...interface{})
- func (cl ConsoleLogger) WithCached(isCached bool) ConsoleLogger
- func (cl ConsoleLogger) WithFailed(isFailed bool) ConsoleLogger
- func (cl ConsoleLogger) WithPrefix(prefix string) ConsoleLogger
- func (cl ConsoleLogger) WithPrefixAndSalt(prefix string, salt string) ConsoleLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColorMode ¶ added in v0.3.0
type ColorMode int
ColorMode is the mode in which colors are represented in the output.
type ConsoleLogger ¶
type ConsoleLogger struct {
// contains filtered or unexported fields
}
ConsoleLogger is a writer for consoles.
func (ConsoleLogger) Prefix ¶
func (cl ConsoleLogger) Prefix() string
Prefix returns the console's prefix.
func (ConsoleLogger) PrintBytes ¶
func (cl ConsoleLogger) PrintBytes(data []byte)
PrintBytes prints bytes directly to the console.
func (ConsoleLogger) PrintFailure ¶ added in v0.3.0
func (cl ConsoleLogger) PrintFailure()
PrintFailure prints the failure message.
func (ConsoleLogger) PrintSuccess ¶
func (cl ConsoleLogger) PrintSuccess()
PrintSuccess prints the success message.
func (ConsoleLogger) Printf ¶
func (cl ConsoleLogger) Printf(format string, args ...interface{})
Printf prints formatted text to the console.
func (ConsoleLogger) Warnf ¶ added in v0.2.0
func (cl ConsoleLogger) Warnf(format string, args ...interface{})
Warnf prints a warning message in red
func (ConsoleLogger) WithCached ¶
func (cl ConsoleLogger) WithCached(isCached bool) ConsoleLogger
WithCached returns a ConsoleLogger with isCached flag set accordingly.
func (ConsoleLogger) WithFailed ¶ added in v0.3.0
func (cl ConsoleLogger) WithFailed(isFailed bool) ConsoleLogger
WithFailed returns a ConsoleLogger with isFailed flag set accordingly.
func (ConsoleLogger) WithPrefix ¶
func (cl ConsoleLogger) WithPrefix(prefix string) ConsoleLogger
WithPrefix returns a ConsoleLogger with a prefix added.
func (ConsoleLogger) WithPrefixAndSalt ¶ added in v0.3.0
func (cl ConsoleLogger) WithPrefixAndSalt(prefix string, salt string) ConsoleLogger
WithPrefixAndSalt returns a ConsoleLogger with a prefix and a seed added.