Documentation ¶
Index ¶
- Variables
- func Close()
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func IsDebugEnabled() bool
- func LogLevel(level string) logrus.Level
- func Setup(program string, logDir string, level logrus.Level) error
- func Trace(args ...interface{})
- func Tracef(format string, args ...interface{})
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- func Warning(args ...interface{})
- func Warningf(format string, args ...interface{})
- type Formatter
- type Logger
- func (l *Logger) AddHook(hook logrus.Hook)
- func (l *Logger) Close() error
- func (l *Logger) Logger() *logrus.Logger
- func (l *Logger) Reload() error
- func (l *Logger) SetFormatter(formatter logrus.Formatter)
- func (l *Logger) SetLevel(level logrus.Level)
- func (l *Logger) SetOutput(path string) error
- func (l *Logger) SetReportCaller(reportCaller bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var LOG *logrus.Entry
Functions ¶
func IsDebugEnabled ¶
func IsDebugEnabled() bool
Types ¶
type Formatter ¶
type Formatter struct { // FieldsOrder - default: fields sorted alphabetically FieldsOrder []string // TimestampFormat - default: time.StampMilli = "Jan _2 15:04:05.000" TimestampFormat string // HideKeys - show [fieldValue] instead of [fieldKey:fieldValue] HideKeys bool // NoColors - disable colors NoColors bool // NoFieldsColors - apply colors only to the level, default is level + fields NoFieldsColors bool // NoFieldsSpace - no space between fields NoFieldsSpace bool // ShowFullLevel - show a full level [WARNING] instead of [WARN] ShowFullLevel bool // NoUppercaseLevel - no upper case for level value NoUppercaseLevel bool // TrimMessages - trim whitespaces on messages TrimMessages func(s string) string // CallerFirst - print caller info first CallerFirst bool // CustomCallerFormatter - set custom formatter for caller info CustomCallerFormatter func(*runtime.Frame) string }
Formatter - logrus formatter, implements logrus.Formatter
func NewFormatter ¶
func NewFormatter() *Formatter
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) SetFormatter ¶
func (*Logger) SetReportCaller ¶
Click to show internal directories.
Click to hide internal directories.