Skip to content

Instantly share code, notes, and snippets.

@jnovack
Created October 13, 2018 21:07
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 jnovack/8d9e0bc49bd988fdc8909647138eb287 to your computer and use it in GitHub Desktop.
Save jnovack/8d9e0bc49bd988fdc8909647138eb287 to your computer and use it in GitHub Desktop.
Go Journaling
package main
import (
journal "github.com/coreos/go-systemd/journal"
)
func j(message string) {
err := journal.Send(message, journal.PriInfo, tags)
if err != nil {
log.Fatalf("%s", err)
}
}
func main() {
s := "world!"
j(fmt.Sprintf("Hello %s", s))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment