zhangzengfei
2022-01-22 5413b950ac6693e24ac1cd7d8974ab8aa270b644
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package logc
 
import "encoding/json"
 
type VaSystemLog struct {
    ID        string `gorm:"column:id;primaryKey;unique;autoIncrement" json:"id"` // 主键id
    HostName  string `gorm:"column:hostName" json:"hostName"`                     // 主机名
    ProcName  string `gorm:"column:procName" json:"procName"`                     // 进程名
    ProcID    string `gorm:"column:procID" json:"procID"`                         // 进程pid
    Level     int    `gorm:"column:level" json:"level"`                           // 日志等级
    Info      string `gorm:"column:info" json:"info"`                             // 详情
    Timestamp int64  `gorm:"column:timestamp" json:"timestamp"`                   // 时间戳Unix time
}
 
func (v *VaSystemLog) Marshal() ([]byte, error) {
    return json.Marshal(v)
}
 
func (v *VaSystemLog) Topic() string {
    return VaSystemLogTopic
}