Documentation ¶
Index ¶
- Variables
- type Logger
- func (l *Logger) Fatal(a ...interface{})
- func (l *Logger) Fatalf(format string, a ...interface{})
- func (l *Logger) Fatalln(a ...interface{})
- func (l *Logger) IsEnabled() bool
- func (l *Logger) Panic(a ...interface{})
- func (l *Logger) Panicf(format string, a ...interface{})
- func (l *Logger) Panicln(a ...interface{})
- func (l *Logger) Print(v ...interface{})
- func (l *Logger) Printf(format string, a ...interface{})
- func (l *Logger) Println(a ...interface{})
- func (l *Logger) SetEnable(enable bool)
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 ¶
Logger is just a log.Logger
func New ¶
New creates a new Logger. The out variable sets the destination to which log data will be written. The prefix appears at the beginning of each generated log line. The flag argument defines the logging properties.
func (*Logger) Fatal ¶
func (l *Logger) Fatal(a ...interface{})
Fatal is equivalent to l.Print() followed by a call to os.Exit(1).
func (*Logger) Fatalln ¶
func (l *Logger) Fatalln(a ...interface{})
Fatalln is equivalent to l.Println() followed by a call to os.Exit(1).
func (*Logger) Panic ¶
func (l *Logger) Panic(a ...interface{})
Panic is equivalent to l.Print() followed by a call to panic().
func (*Logger) Panicln ¶
func (l *Logger) Panicln(a ...interface{})
Panicln is equivalent to l.Println() followed by a call to panic().
func (*Logger) Print ¶
func (l *Logger) Print(v ...interface{})
Print calls l.Output to print to the logger. Arguments are handled in the manner of fmt.Print.
func (*Logger) Printf ¶
Printf calls l.Output to print to the logger. Arguments are handled in the manner of fmt.Printf.