Documentation ¶
Index ¶
- Variables
- type Logger
- func (l *Logger) Dangerf(format string, a ...interface{})
- func (l *Logger) Fatal(a interface{})
- func (l *Logger) Fatalf(format string, a ...interface{})
- func (l *Logger) Infof(format string, a ...interface{})
- func (l *Logger) IsEnabled() bool
- func (l *Logger) Otherf(format string, a ...interface{})
- func (l *Logger) Panic(a interface{})
- func (l *Logger) Panicf(format string, a ...interface{})
- func (l *Logger) Print(a interface{})
- func (l *Logger) PrintBanner(banner string, successMessage string)
- func (l *Logger) Printf(format string, a ...interface{})
- func (l *Logger) Println(a interface{})
- func (l *Logger) ResetColors()
- func (l *Logger) SetEnable(enable bool)
- func (l *Logger) Successf(format string, a ...interface{})
- func (l *Logger) Warningf(format string, a ...interface{})
Constants ¶
This section is empty.
Variables ¶
var (
// Prefix is the prefix for the logger, default is [IRIS]
Prefix = "[IRIS] "
)
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger the logger
func (*Logger) Dangerf ¶
Dangerf calls l.Output to print to the logger with the Danger colors. Arguments are handled in the manner of fmt.Printf.
func (*Logger) Fatal ¶
func (l *Logger) Fatal(a interface{})
Fatal is equivalent to l.Dangerf("%#v",interface{}) followed by a call to panic().
func (*Logger) Infof ¶
Infof calls l.Output to print to the logger with the Info colors. Arguments are handled in the manner of fmt.Printf.
func (*Logger) Otherf ¶
Otherf calls l.Output to print to the logger with the Other colors. Arguments are handled in the manner of fmt.Printf.
func (*Logger) Panic ¶
func (l *Logger) Panic(a interface{})
Panic is equivalent to l.Dangerf("%#v",interface{}) followed by a call to panic().
func (*Logger) Print ¶
func (l *Logger) Print(a interface{})
Print calls l.Output to print to the logger. Arguments are handled in the manner of fmt.Print.
func (*Logger) PrintBanner ¶
PrintBanner prints a text (banner) with BannerFgColor, BannerBgColor and a success message at the end It doesn't cares if the logger is disabled or not, it will print this
func (*Logger) Printf ¶
Printf calls l.Output to print to the logger. Arguments are handled in the manner of fmt.Printf.
func (*Logger) Println ¶
func (l *Logger) Println(a interface{})
Println calls l.Output to print to the logger. Arguments are handled in the manner of fmt.Println.
func (*Logger) ResetColors ¶
func (l *Logger) ResetColors()
ResetColors sets the colors to the default this func is called every time a success, info, warning, or danger message is printed