Documentation
¶
Index ¶
- Variables
- func Debug(v ...any)
- func Debugf(format string, v ...any)
- func Error(v ...any)
- func Errorf(format string, v ...any)
- func Fatal(v ...any)
- func Fatalf(format string, v ...any)
- func Info(v ...any)
- func Infof(format string, v ...any)
- func Panic(v ...any)
- func Panicf(format string, v ...any)
- func PrintJson(data any, pretty bool)
- func SetDebug()
- func SetError()
- func SetFormat(format int)
- func SetInfo()
- func SetLogLevel(level LogLevel)
- func SetOutputLevel(outputLevel int)
- func StdOut(format int) *log.Logger
- func Warning(v ...any)
- func Warningf(format string, v ...any)
- type LogLevel
- type Logger
- func (l *Logger) Debug(v ...any)
- func (l *Logger) Debugf(format string, v ...any)
- func (l *Logger) Error(v ...any)
- func (l *Logger) Errorf(format string, v ...any)
- func (l *Logger) Fatal(v ...any)
- func (l *Logger) Fatalf(format string, v ...any)
- func (l *Logger) GetErrorLogger() *log.Logger
- func (l *Logger) GetLevel() LogLevel
- func (l *Logger) GetPrintLogger() *log.Logger
- func (l *Logger) Info(v ...any)
- func (l *Logger) Infof(format string, v ...any)
- func (l *Logger) Json(data any)
- func (l *Logger) JsonPretty(data any)
- func (l *Logger) Panic(v ...any)
- func (l *Logger) Panicf(format string, v ...any)
- func (l *Logger) SetLevel(level LogLevel)
- func (l *Logger) SetOutputLevel(outputLevel int)
- func (l *Logger) Warning(v ...any)
- func (l *Logger) Warningf(format string, v ...any)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LogLevelInfo LogLevel = "info" LogLevelDebug LogLevel = "debug" LogLevelError LogLevel = "error" LogFormatWithFile = log.Ldate | log.Ltime | log.Lshortfile | log.Lmsgprefix LogFormatTime = log.Ldate | log.Ltime | log.Lmsgprefix LogFormatPrefixOnly = log.Lmsgprefix LogFormatVerbose = log.Ldate | log.Ltime | log.Llongfile | log.Lmsgprefix )
Functions ¶
func SetLogLevel ¶
func SetLogLevel(level LogLevel)
func SetOutputLevel ¶
func SetOutputLevel(outputLevel int)
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLoggerWithFormat ¶
func (*Logger) GetErrorLogger ¶
func (*Logger) GetPrintLogger ¶
func (*Logger) JsonPretty ¶
func (*Logger) SetOutputLevel ¶
Click to show internal directories.
Click to hide internal directories.