Compare commits

..

2 Commits

Author SHA1 Message Date
yuguojian
7f0c64fd8a 日志参数转字符串 2025-07-15 15:26:59 +08:00
yuguojian
093b34f32f 日志参数转字符串 2025-07-14 15:51:53 +08:00
2 changed files with 2 additions and 78 deletions

View File

@@ -1,75 +0,0 @@
{
"settings": {
"index": {
"mapping": {
"source": {
"mode": "synthetic"
}
}
}
},
"mappings": {
"properties": {
"caller": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"created_at": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis||epoch_second"
},
"level": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"log": {
"properties": {
"at": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis||epoch_second"
},
"log_type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"param": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"result": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"title": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
}
}
}
}
}
}

View File

@@ -37,7 +37,7 @@ const (
type Operator struct { type Operator struct {
ID int // 系统ID设置0 ID int // 系统ID设置0
OperatorType OperatorType OperatorType OperatorType `json:"operator_type"`
} }
type LogInfo struct { type LogInfo struct {
@@ -150,6 +150,5 @@ func processValue(value interface{}) interface{} {
if value == nil { if value == nil {
return "" return ""
} }
// 对于其他类型,转换为字符串
return fmt.Sprintf("%+v", value) return fmt.Sprintf("%+v", value)
} }