Documentation
¶
Index ¶
- Variables
- func Debug(format string, args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(format string, args ...interface{})
- func Errorf(format string, args ...interface{})
- func ExportLogger() *log.Logger
- func Fatal(format string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(format string, args ...interface{})
- func Infof(format string, args ...interface{})
- func Initialize(opts *Options)
- func SetColorful(colorful bool)
- func SetLevel(level Level)
- func SetOutput(w io.Writer)
- func SetPrefix(prefix string)
- func UseLogger(l *Logger)
- func Warn(format string, args ...interface{})
- func Warnf(format string, args ...interface{})
- type Level
- type Logger
- func (l *Logger) Debug(format string, args ...interface{})
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(format string, args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Fatal(format string, args ...interface{})
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) Info(format string, args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) SetColorful(colorful bool)
- func (l *Logger) SetLevel(level Level)
- func (l *Logger) SetOutput(w io.Writer)
- func (l *Logger) SetPrefix(prefix string)
- func (l *Logger) Warn(format string, args ...interface{})
- func (l *Logger) Warnf(format string, args ...interface{})
- type Options
Constants ¶
This section is empty.
Variables ¶
var Global = defaultLogger
Global logger for use throughout the application
Functions ¶
func Debug ¶
func Debug(format string, args ...interface{})
Debug logs a debug message to the default logger
func Error ¶
func Error(format string, args ...interface{})
Error logs an error message to the default logger
func ExportLogger ¶
ExportLogger exports the logger for use by CGO or other packages
func Fatal ¶
func Fatal(format string, args ...interface{})
Fatal logs a fatal message to the default logger and exits
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf logs a formatted fatal message and exits
func Info ¶
func Info(format string, args ...interface{})
Info logs an info message to the default logger
func Initialize ¶
func Initialize(opts *Options)
Initialize initializes the global logger with options
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is the application logger
func DiscardLogger ¶
func DiscardLogger() *Logger
DiscardLogger returns a logger that discards all output
func WithOutput ¶
WithOutput returns a new logger with the specified output
func WithPrefix ¶
WithPrefix returns a new logger with the specified prefix
func (*Logger) SetColorful ¶
SetColorful enables or disables colored output