Golang log/syslog.New() function example
package log/syslog
Golang log/syslog.New() function usage example
package main
import (
"fmt"
"log/syslog"
)
func main() {
var wLogger *syslog.Writer
// syslog.LOG_CRIT is a priority
// see http://golang.org/pkg/log/syslog/#Priority for more example
wLogger, err := syslog.New(syslog.LOG_CRIT, "Critical error occured!")
fmt.Println(wLogger)
fmt.Println(err)
}
Reference :
Advertisement
Something interesting
Tutorials
+6.9k Default cipher that OpenSSL used to encrypt a PEM file
+13.5k Facebook PHP getUser() returns 0
+14.4k Golang : Recombine chunked files example
+19.4k Golang : Fix cannot download, $GOPATH not set error
+6.9k How to let Facebook Login button redirect to a particular URL ?
+10.1k Golang : Identifying Golang HTTP client request
+5.9k Facebook : How to force facebook to scrape latest URL link data?
+22.7k Golang : Set and Get HTTP request headers example
+32.7k Golang : Regular Expression for alphanumeric and underscore
+16.5k Golang : Execute terminal command to remote machine example
+5.1k Golang : Display packages names during compilation
+4.7k MariaDB/MySQL : Form select statement or search query with Chinese characters