Documentation ¶
Index ¶
- Constants
- Variables
- func Close(ctx context.Context)
- func ConfigLog()
- func GetLogDuration(isDebug bool, s time.Time) time.Duration
- func GetLogLevel() logrus.Level
- func GetLogNow(isDebug bool) time.Time
- func GetLogSql(sql string) string
- func GetLogger(model string) *logrus.Entry
- func GinLog() gin.HandlerFunc
- func GinRecoverLog() gin.HandlerFunc
- func IsDebug() bool
- func SetLevel(level string) error
- type FileHook
- type TaosLogFormatter
- type TaosSqlLogFormatter
Constants ¶
View Source
const MaxLogSqlLength = 1024
Variables ¶
View Source
var ServerID = randomID()
Functions ¶
func GetLogLevel ¶
func GinLog ¶
func GinLog() gin.HandlerFunc
func GinRecoverLog ¶
func GinRecoverLog() gin.HandlerFunc
Types ¶
type FileHook ¶
func NewFileHook ¶
func NewFileHook(formatter logrus.Formatter, writer io.WriteCloser) *FileHook
type TaosLogFormatter ¶
type TaosLogFormatter struct { }
type TaosSqlLogFormatter ¶
type TaosSqlLogFormatter struct { }
Click to show internal directories.
Click to hide internal directories.