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.6k Golang : Warp text string by number of characters or runes example
+19.6k Golang : Set or Add HTTP Request Headers
+10.9k Golang : How to transmit update file to client by HTTP request example
+15.4k Golang : Find location by IP address and display with Google Map
+9.9k Golang : Ordinal and Ordinalize a given number to the English ordinal numeral
+9k Golang : How to use Gorilla webtoolkit context package properly
+22.9k Golang : Gorilla mux routing example
+14.5k Golang : How to check if your program is running in a terminal
+13k Golang : Get terminal width and height example
+15.3k nginx: [emerg] unknown directive "ssl"
+15.2k Golang : Get timezone offset from date or timestamp
+11.5k Use systeminfo to find out installed Windows Hotfix(s) or updates