From 30a9ba339429593c552b31dbbfb4f67ed56ac466 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期一, 24 一月 2022 16:55:28 +0800
Subject: [PATCH] 修改系统日志数据结构
---
vaSystemLog.go | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/vaSystemLog.go b/vaSystemLog.go
index cf082d8..6f6d005 100644
--- a/vaSystemLog.go
+++ b/vaSystemLog.go
@@ -2,14 +2,26 @@
import "encoding/json"
+const (
+ DebugLevel = iota - 1
+ InfoLevel
+ WarnLevel
+ ErrorLevel
+ DPanicLevel
+ PanicLevel
+ FatalLevel
+)
+
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"` // 鏃堕棿鎴砋nix time
+ ID string `gorm:"column:id;primaryKey;unique;autoIncrement" json:"id"` // 涓婚敭id
+ HostName string `gorm:"column:hostName" json:"hostName"` // 涓绘満鍚�
+ Address string `gorm:"column:address" json:"address"` // ip
+ ProcName string `gorm:"column:procName" json:"procName"` // 杩涚▼鍚�
+ ProcID int `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"` // 鏃堕棿鎴�
+ CreateDate string `gorm:"column:createDate" json:"createDate"` // 鍒涘缓鏃堕棿
}
func (v *VaSystemLog) Marshal() ([]byte, error) {
--
Gitblit v1.8.0