Skip to content

robertkowalski/graylog-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

graylog-golang

graylog-golang is a full implementation for sending messages in GELF (Graylog Extended Log Format) from Go (Golang) to Graylog

Example

package main

import (
  "github.com/robertkowalski/graylog-golang"
)

func main() {

  g := gelf.New(gelf.Config{})

  g.Log(`{
      "version": "1.0",
      "host": "localhost",
      "timestamp": 1356262644,
      "facility": "Google Go",
      "short_message": "Hello From Golang!"
  }`)
}

Setting Config Values

g := gelf.New(gelf.Config{
  GraylogPort:     80,
  GraylogHostname: "example.com",
  Connection:      "wan",
  MaxChunkSizeWan: 42,
  MaxChunkSizeLan: 1337,
})

Tests

go test

Benchmarks

go test --bench=".*"

About

graylog-golang is a full implementation for sending messages in GELF (Graylog Extended Log Format) from Go (Golang) to Graylog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages