Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
Id *int64 `gorm:"primaryKey;autoIncrement;column:id" json:"id"`
Host null.String `gorm:"column:host" json:"host"`
Timestamp null.DateTime `gorm:"column:timestamp" json:"timestamp"`
File null.String `gorm:"column:file" json:"file"`
Func null.String `gorm:"column:func" json:"func"`
Message null.String `gorm:"column:message" json:"message"`
Level null.String `gorm:"column:level" json:"level"`
Data null.JSON `gorm:"column:data" json:"data"`
}
type ExecCloser ¶
ExecCloser 将logrus条目写入数据库并关闭数据库
func NewExec ¶
func NewExec(client *gorm.DB, loggerTableName string) ExecCloser
NewExec create an exec instance
func NewExecWithURL ¶
func NewExecWithURL(client *gorm.DB, loggerTableName string) ExecCloser
NewExecWithURL create an exec instance
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook 将日志发送到数据库
func DefaultWithURL ¶
DefaultWithURL create a default mongo hook
Click to show internal directories.
Click to hide internal directories.