Skip to content

Instantly share code, notes, and snippets.

@gclitheroe
Created March 25, 2015 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gclitheroe/8c40bc84da4227b8e4df to your computer and use it in GitHub Desktop.
Save gclitheroe/8c40bc84da4227b8e4df to your computer and use it in GitHub Desktop.
Golang - Log to Logentries - TLS
package main
import (
"github.com/GeoNet/log/logentries"
"log"
"time"
)
func init() {
logentries.Init("LOGENTRIES_TOKEN")
}
func main() {
for {
log.Print("Hello Logentries.")
time.Sleep(time.Duration(5) * time.Second)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment