GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Devatoria/go-graylog: Graylog GELF messages sending using UDP, TCP or TCP/TLS, written in Golang.

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
graylog.go
graylog.go
 
 

Repository files navigation

go-graylog

GoDoc

Graylog GELF messages sending using UDP, TCP or TCP/TLS, written in Golang.

Examples

package main

import (
	"time"

	"github.com/Devatoria/go-graylog"
)

func main() {
    // Initialize a new graylog client with TLS
	g, err := graylog.NewGraylogTLS(graylog.Endpoint{
		Transport: graylog.TCP,
		Address:   "localhost",
		Port:      12202,
	}, 3*time.Second, nil)
	if err != nil {
		panic(err)
	}

    // Send a message
	err = g.Send(graylog.Message{
		Version:      "1.1",
		Host:         "localhost",
		ShortMessage: "Sample test",
		FullMessage:  "Stacktrace",
		Timestamp:    time.Now().Unix(),
		Level:        1,
		Extra: map[string]string{
			"MY-EXTRA-FIELD": "extra_value",
		},
	})
    if err != nil {
        panic(err)
    }

    // Close the graylog connection
    if err := g.Close(); err != nil {
        panic(err)
    }
}

About

Graylog GELF messages sending using UDP, TCP or TCP/TLS, written in Golang.

Resources

Readme
MIT license
Activity

Stars

19 stars

Watchers

0 watching

Forks

10 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.