Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Level is the maximum level to output, logs with lower level are discarded. Level // Fields defines default fields to use with all messages. Fields // Output destination for levels: debug, info, warn Out io.Writer // Output destination for levels: error, fatal Err io.Writer // Do not log date and time if false Time bool // Use UTC time UTC bool }
Config contains log level and default fields
type Logger ¶
type Logger interface { // Debug logs a debug message Debug(v ...interface{}) // Debug logs a debug message with format Debugf(format string, v ...interface{}) // Info logs a info message Info(v ...interface{}) // Info logs a info message with format Infof(format string, v ...interface{}) // Warn logs a warning message. Warn(v ...interface{}) // Warn logs a warning message with format. Warnf(format string, v ...interface{}) // Error logs an error message Error(v ...interface{}) // Error logs an error message with format Errorf(format string, v ...interface{}) // Fatal logs an error message followed by a call to os.Exit(1) Fatal(v ...interface{}) // Fatalf logs an error message with format followed by a call to ox.Exit(1) Fatalf(format string, v ...interface{}) }
Logger defines the interface for a compatible logger
Source Files
¶
- logger.go
Click to show internal directories.
Click to hide internal directories.