Documentation ¶
Index ¶
- func NewRotateFileHook(config RotateFileConfig) logrus.Hook
- type ColorScheme
- type FLogPrint
- type FLogPrintf
- type Logger
- func (log *Logger) Debug(args ...interface{})
- func (log *Logger) Debugf(format string, args ...interface{})
- func (log *Logger) Debugln(args ...interface{})
- func (log *Logger) Error(args ...interface{})
- func (log *Logger) Errorf(format string, args ...interface{})
- func (log *Logger) Errorln(args ...interface{})
- func (log *Logger) Fatal(args ...interface{})
- func (log *Logger) Fatalf(format string, args ...interface{})
- func (log *Logger) Fatalln(args ...interface{})
- func (log *Logger) Info(args ...interface{})
- func (log *Logger) Infof(format string, args ...interface{})
- func (log *Logger) Infoln(args ...interface{})
- func (log *Logger) Panic(args ...interface{})
- func (log *Logger) Panicf(format string, args ...interface{})
- func (log *Logger) Panicln(args ...interface{})
- func (log *Logger) Print(args ...interface{})
- func (log *Logger) Println(args ...interface{})
- func (log *Logger) SetLogLevel(level string)
- func (log *Logger) SqlDebug(args ...interface{})
- func (log *Logger) Warn(args ...interface{})
- func (log *Logger) Warnf(format string, args ...interface{})
- func (log *Logger) Warning(args ...interface{})
- func (log *Logger) Warningf(format string, args ...interface{})
- func (log *Logger) Warningln(args ...interface{})
- func (log *Logger) Warnln(args ...interface{})
- func (log *Logger) WithField(key string, value interface{}) *logrus.Entry
- func (log *Logger) WithFields(fields logrus.Fields) *logrus.Entry
- type RotateFileConfig
- type RotateFileHook
- type TLogConfig
- type TextFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRotateFileHook ¶
func NewRotateFileHook(config RotateFileConfig) logrus.Hook
Types ¶
type ColorScheme ¶
type FLogPrintf ¶
type FLogPrintf func(format string, args ...interface{})
type Logger ¶
var Log *Logger
func LogInitWithConfig ¶
func LogInitWithConfig(conf *TLogConfig) *Logger
func (*Logger) SetLogLevel ¶
type RotateFileConfig ¶
type RotateFileHook ¶
type RotateFileHook struct { Config RotateFileConfig // contains filtered or unexported fields }
func (*RotateFileHook) Levels ¶
func (hook *RotateFileHook) Levels() []logrus.Level
type TLogConfig ¶
type TextFormatter ¶
type TextFormatter struct { // Set to true to bypass checking for a TTY before outputting colors. ForceColors bool // Force disabling colors. For a TTY colors are enabled by default. DisableColors bool // Force formatted layout, even for non-TTY output. ForceFormatting bool // Disable timestamp logging. useful when output is redirected to logging // system that already adds timestamps. DisableTimestamp bool // Disable the conversion of the log levels to uppercase DisableUppercase bool // Enable logging the full timestamp when a TTY is attached instead of just // the time passed since beginning of execution. FullTimestamp bool // Timestamp format to use for display when a full timestamp is printed. TimestampFormat string // The fields are sorted by default for a consistent output. For applications // that log extremely frequently and don't use the JSON formatter this may not // be desired. DisableSorting bool // Wrap empty fields in quotes if true. QuoteEmptyFields bool // Can be set to the override the default quoting character " // with something else. For example: ', or `. QuoteCharacter string // Pad msg field with spaces on the right for display. // The value for this parameter will be the size of padding. // Its default value is zero, which means no padding will be applied for msg. SpacePadding int sync.Once // contains filtered or unexported fields }
func (*TextFormatter) SetColorScheme ¶
func (f *TextFormatter) SetColorScheme(colorScheme *ColorScheme)
Click to show internal directories.
Click to hide internal directories.