Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NullLogger ¶
type NullLogger struct{}
NullLogger will drop all inputs
func (*NullLogger) Print ¶
func (l *NullLogger) Print(v ...interface{})
func (*NullLogger) Printf ¶
func (l *NullLogger) Printf(format string, v ...interface{})
func (*NullLogger) Println ¶
func (l *NullLogger) Println(v ...interface{})
type Printer ¶
type Printer interface { // Print formats using the default formats for its operands and writes to specific output. Print(v ...interface{}) // Printf formats according to a format specifier and writes to specific output. Printf(format string, v ...interface{}) // Println formats using the default formats for its operands and writes to specific output. Println(v ...interface{}) }
Printer will write logs to specific output.
type PrinterCloser ¶
PrinterCloser is the Printer which can be closed
func NewFileLogger ¶
func NewFileLogger(path string) PrinterCloser
NewFileLogger creates a printer that writes to the given file path.
func NewStdLogger ¶
func NewStdLogger() PrinterCloser
NewStdLogger creates a a printer that writes to StdOut.
Click to show internal directories.
Click to hide internal directories.