Documentation
¶
Index ¶
- Constants
- func Debug(format string, args ...interface{})
- func DebugX(field string, format string, args ...interface{})
- func Error(format string, args ...interface{})
- func ErrorX(field string, format string, args ...interface{})
- func Fatal(format string, args ...interface{})
- func FatalX(field string, format string, args ...interface{})
- func FlushLog()
- func GetLogID(ctx context.Context) string
- func Info(format string, args ...interface{})
- func InfoX(field string, format string, args ...interface{})
- func InitLog(output string) (err error)
- func Warn(format string, args ...interface{})
- func WarnX(field string, format string, args ...interface{})
- type ConsoleHook
- type FileHook
- type Logger
- type RotateHook
Constants ¶
View Source
const (
CtxKeyLogID = "U_LOGID"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConsoleHook ¶
func (*ConsoleHook) Levels ¶
func (hook *ConsoleHook) Levels() []logrus.Level
type RotateHook ¶
type RotateHook struct {
Filename string
MaxSize int64
MaxBackups int
MaxAge int
LocalTime bool
// contains filtered or unexported fields
}
func NewRotateHook ¶
func NewRotateHook(filename string) *RotateHook
func (*RotateHook) Levels ¶
func (hook *RotateHook) Levels() []logrus.Level
Click to show internal directories.
Click to hide internal directories.