Fix "PR c++/92804 ICE trying to use concept as a nested-name-specifier"
[official-gcc.git] / libgo / go / log / syslog / example_test.go
blob4288d37dee03ab13c137f2539cf083721afbf09c
1 // Copyright 2016 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build !windows,!plan9
7 package syslog_test
9 import (
10 "fmt"
11 "log"
12 "log/syslog"
15 func ExampleDial() {
16 sysLog, err := syslog.Dial("tcp", "localhost:1234",
17 syslog.LOG_WARNING|syslog.LOG_DAEMON, "demotag")
18 if err != nil {
19 log.Fatal(err)
21 fmt.Fprintf(sysLog, "This is a daemon warning with demotag.")
22 sysLog.Emerg("And this is a daemon emergency with demotag.")