Documentation
¶
Index ¶
- Constants
- func Close()
- func Debug(v ...interface{})
- func DebugWithContext(ctx context.Context, v ...interface{})
- func Debugf(format string, v ...interface{})
- func DebugfWithContext(ctx context.Context, format string, v ...interface{})
- func Error(v ...interface{})
- func ErrorWithContext(ctx context.Context, v ...interface{})
- func Errorf(format string, v ...interface{})
- func ErrorfWithContext(ctx context.Context, format string, v ...interface{})
- func GenLogId() string
- func Info(v ...interface{})
- func InfoWithContext(ctx context.Context, v ...interface{})
- func Infof(format string, v ...interface{})
- func InfofWithContext(ctx context.Context, format string, v ...interface{})
- func Init(path string, app string, level string, expireDay int) error
- func LogIdFromContext(ctx context.Context) (string, bool)
- func NewContextWithHttpReq(ctx context.Context, r *http.Request) context.Context
- func NewContextWithLogID(ctx context.Context) context.Context
- func NewContextWithSpecifyLogID(ctx context.Context, logId string) context.Context
- func NewGrpcContextWithLogID(ctx context.Context) context.Context
- func Notice(v ...interface{})
- func NoticeWithContext(ctx context.Context, v ...interface{})
- func Noticef(format string, v ...interface{})
- func NoticefWithContext(ctx context.Context, format string, v ...interface{})
- func Panic(v ...interface{})
- func PanicWithContext(ctx context.Context, v ...interface{})
- func Panicf(format string, v ...interface{})
- func PanicfWithContext(ctx context.Context, format string, v ...interface{})
- func Warn(v ...interface{})
- func WarnWithContext(ctx context.Context, v ...interface{})
- func Warnf(format string, v ...interface{})
- func WarnfWithContext(ctx context.Context, format string, v ...interface{})
- type Level
- type Logger
- type Writer
Constants ¶
View Source
const ( DEFAULT_FILEWRITER_MAX_EXPIRE_DAY = 7 //日志默认有效天数 DEFAULT_FILEWRITER_FILE_SUFFIX_TIME_STRING = "2006010215" //日志文件时间前缀 DEFAULT_FILEWRITER_MSG_SUFFIX_TIME_STRING = "06-01-02 15:04:05.999" //日志时间格式 LogIDKey = "log-id" )
Variables ¶
This section is empty.
Functions ¶
func DebugWithContext ¶ added in v1.2.0
func DebugfWithContext ¶ added in v1.2.0
func ErrorWithContext ¶ added in v1.2.0
func ErrorfWithContext ¶ added in v1.2.0
func InfoWithContext ¶ added in v1.2.0
func InfofWithContext ¶ added in v1.2.0
func NewContextWithHttpReq ¶ added in v1.2.0
func NewContextWithLogID ¶ added in v1.2.0
func NewContextWithSpecifyLogID ¶ added in v1.2.0
func NewGrpcContextWithLogID ¶ added in v1.2.0
func NoticeWithContext ¶ added in v1.2.0
func NoticefWithContext ¶ added in v1.2.0
func PanicWithContext ¶ added in v1.2.0
func PanicfWithContext ¶ added in v1.2.0
func WarnWithContext ¶ added in v1.2.0
func WarnfWithContext ¶ added in v1.2.0
Types ¶
Click to show internal directories.
Click to hide internal directories.