Documentation ¶
Index ¶
- Constants
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func GetOutFile() (out io.Writer)
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Init() func()
- func Print(args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- type GiNanaStdFormatter
- type Logger
- type Loggers
- func (h Loggers) Debug(args ...interface{})
- func (h Loggers) Debugf(format string, args ...interface{})
- func (h Loggers) Error(args ...interface{})
- func (h Loggers) Errorf(format string, args ...interface{})
- func (h Loggers) GetOutFile() (out io.Writer)
- func (h Loggers) Info(args ...interface{})
- func (h Loggers) Infof(format string, args ...interface{})
- func (h Loggers) Print(args ...interface{})
- func (h Loggers) Printf(format string, args ...interface{})
- func (h Loggers) Println(args ...interface{})
- func (h Loggers) Warn(args ...interface{})
- func (h Loggers) Warnf(format string, args ...interface{})
Constants ¶
View Source
const GoTime = "2006-01-02 15:04:05"
Variables ¶
This section is empty.
Functions ¶
func GetOutFile ¶
Types ¶
type GiNanaStdFormatter ¶
type GiNanaStdFormatter struct { // TimestampFormat sets the format used for marshaling timestamps. TimestampFormat string // DisableTimestamp allows disabling automatic timestamps in output DisableTimestamp bool DisableColors bool }
GiNanaStdFormatter 自定义 formatter
func (*GiNanaStdFormatter) Format ¶
func (f *GiNanaStdFormatter) Format(entry *logrus.Entry) ([]byte, error)
Format implement the Formatter interface
func (*GiNanaStdFormatter) LevelColor ¶
func (f *GiNanaStdFormatter) LevelColor(level interface{}) string
func (*GiNanaStdFormatter) NameColor ¶
func (f *GiNanaStdFormatter) NameColor() string
func (*GiNanaStdFormatter) ResetColor ¶
func (f *GiNanaStdFormatter) ResetColor() string
type Logger ¶
type Logger interface { GetOutFile() (out io.Writer) Print(args ...interface{}) Println(args ...interface{}) Error(args ...interface{}) Warn(args ...interface{}) Info(args ...interface{}) Debug(args ...interface{}) Printf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Warnf(format string, args ...interface{}) Infof(format string, args ...interface{}) Debugf(format string, args ...interface{}) // contains filtered or unexported methods }
Click to show internal directories.
Click to hide internal directories.