Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(message string) error
- func Debugf(message ...any) error
- func Error(message string) error
- func ErrorPrintf(message ...any) error
- func Errorf(message ...any) error
- func Info(message string) error
- func Infof(message ...any) error
- func SetLevel(level int)
- func Verbose(message string) error
- func Verbosef(message ...any) error
- func Warning(message string) error
- func Warningf(message ...any) error
- func WriteToFile(filename string)
- type RainbowLogger
Constants ¶
View Source
const ( LevelNone = iota LevelInfo LevelWarning LevelError LevelVerbose LevelDebug )
Variables ¶
View Source
var (
DefaultLevel = 3
)
Functions ¶
func ErrorPrintf ¶
Print error as a warning, return error for function calling
func WriteToFile ¶
func WriteToFile(filename string)
WriteToFile will set the global level and filename
Types ¶
type RainbowLogger ¶
type RainbowLogger struct { Filename string // contains filtered or unexported fields }
func (*RainbowLogger) Start ¶
func (l *RainbowLogger) Start() (*log.Logger, error)
Start opens a file handle, if it's desired to write to file
func (*RainbowLogger) Stop ¶
func (l *RainbowLogger) Stop() error
Stop closes the file handle, if defined
Click to show internal directories.
Click to hide internal directories.