2021-10-05 20:52:45 +08:00
|
|
|
package logx
|
|
|
|
|
|
|
|
import (
|
|
|
|
"gitee.com/timedb/wheatCache/pkg/event"
|
2021-10-05 21:36:06 +08:00
|
|
|
middle_msg "gitee.com/timedb/wheatCache/pkg/middle-msg"
|
2021-10-05 20:52:45 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type LogLevelState int8
|
|
|
|
|
|
|
|
type upLogger struct {
|
|
|
|
produce *event.ProduceInterface
|
|
|
|
}
|
|
|
|
|
2021-10-05 21:36:06 +08:00
|
|
|
type logInterface interface {
|
|
|
|
Debug(msg interface{}) *middle_msg.LogContext
|
|
|
|
Info(msg interface{}) *middle_msg.LogContext
|
|
|
|
Warn(msg interface{}) *middle_msg.LogContext
|
|
|
|
Error(msg interface{}) *middle_msg.LogContext
|
2021-10-05 20:52:45 +08:00
|
|
|
|
2021-10-05 21:36:06 +08:00
|
|
|
Print(level string, msg interface{}) *middle_msg.LogContext
|
2021-10-05 20:52:45 +08:00
|
|
|
}
|
|
|
|
|
2021-10-05 21:36:06 +08:00
|
|
|
func NewLogger() *upLogger {
|
|
|
|
return &upLogger{}
|
2021-10-05 20:52:45 +08:00
|
|
|
}
|