Documentation
¶
Index ¶
- Variables
- func Debug(msg string, keyvals ...interface{})
- func Error(msg string, keyvals ...interface{})
- func Fatal(msg string, keyvals ...interface{})
- func Info(msg string, keyvals ...interface{})
- func Init(config *Config) error
- func Warn(msg string, keyvals ...interface{})
- func With(keyvals ...interface{}) *log.Logger
- type Config
- type LogLevel
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Logger is the global logger instance Logger *log.Logger )
Functions ¶
func Debug ¶
func Debug(msg string, keyvals ...interface{})
Convenience functions for common log operations
Types ¶
type Config ¶
type Config struct {
Level LogLevel
Output io.Writer
TimeFormat string
Prefix string
LogFile string
CurrentDir string // Current working directory for log file
Version string // Version of the application, can be set at runtime
}
Config holds the logger configuration
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a default logger configuration
Click to show internal directories.
Click to hide internal directories.