Documentation ¶
Index ¶
- func Debug(ctx ...interface{})
- func Error(err error, ctx ...interface{})
- func ErrorMsg(ctx ...interface{})
- func Fatal(err error, ctx ...interface{})
- func FatalMsg(ctx ...interface{})
- func Info(ctx ...interface{})
- func Success(ctx ...interface{})
- func Warning(ctx ...interface{})
- type Logger
- func (config Logger) Debug(ctx ...interface{})
- func (config Logger) Error(err error, ctx ...interface{})
- func (config Logger) ErrorMsg(ctx ...interface{})
- func (config Logger) Fatal(err error, ctx ...interface{})
- func (config Logger) FatalMsg(ctx ...interface{})
- func (config Logger) Info(ctx ...interface{})
- func (config Logger) Success(ctx ...interface{})
- func (config Logger) Warning(ctx ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶ added in v2.1.0
type Logger struct { NormalOut *os.File // The output file for Debug, Success, Warning, and Info. Default is os.Stdout ErrOut *os.File // The output file for Fatal, FatalMsg, Error, and ErrorMsg. Default is os.Stderr ExtraNormalOuts []io.Writer // Extra normal output destinations (e.g. outputting to a file as well) ExtraErrOuts []io.Writer // Extra error output destinations (e.g. outputting to a file as well) ExitCode int // Fatal exit code. Default is 1 ShowStack bool // If stack trades should be included. Default is true Timezone *time.Location // Timezone for the time to be outputted in. Default is time.UTC Padding bool // If the log should have an extra new line at the bottom. Default is true Multiline bool // If the log should span multiple lines. Default is false ColoredOutput bool // If the output should have color. Default is true TrueColor bool // If the output should be true color or basic colors. Default is true if the terminal supports it }
Custom logger for lumber to use
func NewCustomLogger ¶ added in v2.1.0
func NewCustomLogger() Logger
func (Logger) Debug ¶ added in v2.1.0
func (config Logger) Debug(ctx ...interface{})
Output a debug log using a custom logger
func (Logger) ErrorMsg ¶ added in v2.1.0
func (config Logger) ErrorMsg(ctx ...interface{})
Output an error log with no actual error value using a custom logger
func (Logger) FatalMsg ¶ added in v2.1.0
func (config Logger) FatalMsg(ctx ...interface{})
Output a fatal log with no actual error value using a custom logger
func (Logger) Info ¶ added in v2.1.0
func (config Logger) Info(ctx ...interface{})
Output an info log using a custom logger
Click to show internal directories.
Click to hide internal directories.