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 : missing Mercurial command
+16.9k Golang : Read integer from file into array
+18.5k Golang : Aligning strings to right, left and center with fill example
+14.6k Golang : Missing Bazaar command
+10.3k Golang : Detect number of faces or vehicles in a photo
+9.4k Golang : Launch Mac OS X Preview (or other OS) application from your program example
+6.9k Fix sudo yum hang problem with no output or error messages
+8.6k Golang : Set or add headers for many or different handlers
+5.1k Golang : Check if a word is countable or not
+43.3k Golang : Convert []byte to image
+13.5k Golang : Count number of runes in string
+5.8k CodeIgniter/PHP : Remove empty lines above RSS or ATOM xml tag