Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(code int, message interface{})
- func Debugf(code int, format string, args ...interface{})
- func Error(code int, message interface{})
- func Errorf(code int, format string, args ...interface{})
- func Fatal(code int, message interface{})
- func Fatalf(code int, format string, args ...interface{})
- func GetLevel() logrus.Level
- func GetOutput() io.Writer
- func Info(code int, message interface{})
- func Infof(code int, format string, args ...interface{})
- func IsLevelEnabled(level logrus.Level) bool
- func Log(level logrus.Level, code int, message interface{})
- func Logf(level logrus.Level, code int, format string, args ...interface{})
- func Panic(code int, message interface{})
- func Panicf(code int, format string, args ...interface{})
- func SetColored(colored bool)
- func SetLevel(level string) error
- func SetOutput(output io.Writer)
- func Trace(code int, message interface{})
- func Tracef(code int, format string, args ...interface{})
- func Warn(code int, message interface{})
- func Warnf(code int, format string, args ...interface{})
- type Entry
- type Formatter
- type Metadata
- func (m *Metadata) Debug(code int, message interface{})
- func (m *Metadata) Debugf(code int, format string, args ...interface{})
- func (m *Metadata) Error(code int, message interface{})
- func (m *Metadata) Errorf(code int, format string, args ...interface{})
- func (m *Metadata) Fatal(code int, message interface{})
- func (m *Metadata) Fatalf(code int, format string, args ...interface{})
- func (m *Metadata) Info(code int, message interface{})
- func (m *Metadata) Infof(code int, format string, args ...interface{})
- func (m *Metadata) Log(level logrus.Level, code int, message interface{})
- func (m *Metadata) Logf(level logrus.Level, code int, format string, args ...interface{})
- func (m *Metadata) Panic(code int, message interface{})
- func (m *Metadata) Panicf(code int, format string, args ...interface{})
- func (m *Metadata) Trace(code int, message interface{})
- func (m *Metadata) Tracef(code int, format string, args ...interface{})
- func (m *Metadata) Warn(code int, message interface{})
- func (m *Metadata) Warnf(code int, format string, args ...interface{})
Constants ¶
View Source
const ( FullDateFormat = "2006-01-02T15:04:05.000-07:00" Code = "$$code" )
Variables ¶
View Source
var LevelsString = map[logrus.Level]string{ logrus.PanicLevel: "PANIC", logrus.FatalLevel: "FATAL", logrus.ErrorLevel: "ERROR", logrus.WarnLevel: "WARN ", logrus.InfoLevel: "INFO ", logrus.DebugLevel: "DEBUG", logrus.TraceLevel: "TRACE", }
View Source
var LevelsStringColored = map[logrus.Level]string{ logrus.PanicLevel: fmt.Sprintf("\x1b[%dm%s\x1b[0m", red, "PANIC"), logrus.FatalLevel: fmt.Sprintf("\x1b[%dm%s\x1b[0m", redLight, "FATAL"), logrus.ErrorLevel: fmt.Sprintf("\x1b[%dm%s\x1b[0m", red, "ERROR"), logrus.WarnLevel: fmt.Sprintf("\x1b[%dm%s\x1b[0m", yellow, "WARN "), logrus.InfoLevel: fmt.Sprintf("\x1b[%dm%s\x1b[0m", cyanLight, "INFO "), logrus.DebugLevel: fmt.Sprintf("\x1b[%dm%s\x1b[0m", cyan, "DEBUG"), logrus.TraceLevel: fmt.Sprintf("\x1b[%dm%s\x1b[0m", cyan, "TRACE"), }
Functions ¶
func IsLevelEnabled ¶
func SetColored ¶
func SetColored(colored bool)
Types ¶
Click to show internal directories.
Click to hide internal directories.