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
+25.7k Golang : How to write CSV data to file
+11.4k Golang : Delay or limit HTTP requests example
+5.1k Linux : How to set root password in Linux Mint
+5.4k Golang : Qt update UI elements with core.QCoreApplication_ProcessEvents
+34.6k Golang : How to stream file to client(browser) or write to http.ResponseWriter?
+8.8k Android Studio : Image button and button example
+5.5k Golang : Stop goroutine without channel
+13.5k Golang : How to get year, month and day?
+12.3k Golang : List running EC2 instances and descriptions
+9.9k Golang : Check if user agent is a robot or crawler example
+7.4k Linux : How to fix Brother HL-1110 printing blank page problem
+19.1k Mac OSX : Homebrew and Golang