Skip to content
ZandarnPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Go client for GELF protocol

Only UDP.

Example

package main

import (
	"fmt"
	"log"

	"github.com/Zandarn/gelf"
)

func main() {
	client := gelf.GelfClient()
	client.Config.Endpoint = "192.168.1.1:12201"

	gelfMessage := gelf.Message{
		Message:  "Example message",
		Level:    gelf.LogLevel.WARNING,
		Facility: gelf.LogFacility.LOCAL0,
		Extra: map[string]string{
			"Extra-key":   "extra_value",
			"Another key": "another value",
		},
	}

	length, err := client.SendMessage(gelfMessage)
	if err != nil {
		log.Printf("Error: %s", err)
	}

	fmt.Println(length)
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

⌂ 换网址