fix tag name to be included
This commit is contained in:
parent
deb7986cad
commit
280fbdda84
@ -23,8 +23,6 @@ type GELFMessage struct {
|
|||||||
|
|
||||||
// All additional field names must start with an underline.
|
// All additional field names must start with an underline.
|
||||||
ExtraFields map[string]interface{} `json:"extrafields,omitempty"`
|
ExtraFields map[string]interface{} `json:"extrafields,omitempty"`
|
||||||
|
|
||||||
Tag string `json:"tag,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func Log(writer *gelf.UDPWriter, msg GELFMessage) {
|
func Log(writer *gelf.UDPWriter, msg GELFMessage) {
|
||||||
@ -40,7 +38,6 @@ func Log(writer *gelf.UDPWriter, msg GELFMessage) {
|
|||||||
|
|
||||||
func (g GELFMessage) GELFFormat() *gelf.Message {
|
func (g GELFMessage) GELFFormat() *gelf.Message {
|
||||||
prefixedExtras := make(map[string]interface{}, len(g.ExtraFields))
|
prefixedExtras := make(map[string]interface{}, len(g.ExtraFields))
|
||||||
prefixedExtras["tag"] = g.Tag
|
|
||||||
for k, v := range g.ExtraFields {
|
for k, v := range g.ExtraFields {
|
||||||
prefixedExtras["_"+k] = v
|
prefixedExtras["_"+k] = v
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user