Namespace: go.std.log.syslog
v1.0Contents
Summary
Provides a low-level interface to the log/syslog package.
Package syslog provides a simple interface to the system log
service. It can send messages to the syslog daemon using UNIX
domain sockets, UDP or TCP.
Only one call to Dial is necessary. On write failures,
the syslog client will attempt to reconnect to the server
and write again.
The syslog package is frozen and is not accepting new features.
Some external packages provide more functionality. See:
https://godoc.org/?q=syslog
Index
- *Priority
- *Writer
- Dial
- LOG_ALERT
- LOG_AUTH
- LOG_AUTHPRIV
- LOG_CRIT
- LOG_CRON
- LOG_DAEMON
- LOG_DEBUG
- LOG_EMERG
- LOG_ERR
- LOG_FTP
- LOG_INFO
- LOG_KERN
- LOG_LOCAL0
- LOG_LOCAL1
- LOG_LOCAL2
- LOG_LOCAL3
- LOG_LOCAL4
- LOG_LOCAL5
- LOG_LOCAL6
- LOG_LOCAL7
- LOG_LPR
- LOG_MAIL
- LOG_NEWS
- LOG_NOTICE
- LOG_SYSLOG
- LOG_USER
- LOG_UUCP
- LOG_WARNING
- New
- NewLogger
- Priority
- Writer
- arrayOfPriority
- arrayOfWriter
Legend
-
Constant
Variable
Function
Macro
Special form
Type
GoVar
Receiver/Method
Constants
Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.-
(None.)
Variables
-
LOG_ALERT
GoObject v1.0 -
LOG_AUTH
GoObject v1.0 -
LOG_AUTHPRIV
GoObject v1.0 -
LOG_CRIT
GoObject v1.0 -
LOG_CRON
GoObject v1.0 -
LOG_DAEMON
GoObject v1.0 -
LOG_DEBUG
GoObject v1.0 -
LOG_EMERG
GoObject v1.0From /usr/include/sys/syslog.h.
These are the same on Linux, BSD, and OS X.
-
LOG_ERR
GoObject v1.0 -
LOG_FTP
GoObject v1.0 -
LOG_INFO
GoObject v1.0 -
LOG_KERN
GoObject v1.0From /usr/include/sys/syslog.h.
These are the same up to LOG_FTP on Linux, BSD, and OS X.
-
LOG_LOCAL0
GoObject v1.0 -
LOG_LOCAL1
GoObject v1.0 -
LOG_LOCAL2
GoObject v1.0 -
LOG_LOCAL3
GoObject v1.0 -
LOG_LOCAL4
GoObject v1.0 -
LOG_LOCAL5
GoObject v1.0 -
LOG_LOCAL6
GoObject v1.0 -
LOG_LOCAL7
GoObject v1.0 -
LOG_LPR
GoObject v1.0 -
LOG_MAIL
GoObject v1.0 -
LOG_NEWS
GoObject v1.0 -
LOG_NOTICE
GoObject v1.0 -
LOG_SYSLOG
GoObject v1.0 -
LOG_USER
GoObject v1.0 -
LOG_UUCP
GoObject v1.0 -
LOG_WARNING
GoObject v1.0
Functions, Macros, and Special Forms
-
Dial
Function v1.0(Dial network raddr priority tag)
Dial establishes a connection to a log daemon by connecting to
address raddr on the specified network. Each write to the returned
writer sends a log message with the facility and severity
(from priority) and tag. If tag is empty, the os.Args[0] is used.
If network is empty, Dial will connect to the local syslog server.
Otherwise, see the documentation for net.Dial for valid values
of network and raddr.
Go input arguments: (network string, raddr string, priority Priority, tag string)
Go returns: (*Writer, error)
Joker input arguments: [^String network, ^String raddr, ^Priority priority, ^String tag]
Joker returns: [^*Writer, ^Error] -
New
Function v1.0(New priority tag)
New establishes a new connection to the system log daemon. Each
write to the returned writer sends a log message with the given
priority (a combination of the syslog facility and severity) and
prefix tag. If tag is empty, the os.Args[0] is used.
Go input arguments: (priority Priority, tag string)
Go returns: (*Writer, error)
Joker input arguments: [^Priority priority, ^String tag]
Joker returns: [^*Writer, ^Error] -
NewLogger
Function v1.0(NewLogger p logFlag)
NewLogger creates a log.Logger whose output is written to the
system log service with the specified priority, a combination of
the syslog facility and severity. The logFlag argument is the flag
set passed through to log.New to create the Logger.
Go input arguments: (p Priority, logFlag int)
Go returns: (*log.Logger, error)
Joker input arguments: [^Priority p, ^Int logFlag]
Joker returns: [^go.std.log/*Logger, ^Error]
Types
-
*Priority
Concrete Type v1.0The Priority is a combination of the syslog facility and
severity. For example, LOG_ALERT | LOG_FTP sends an alert severity
message from the FTP facility. The default severity is LOG_EMERG;
the default facility is LOG_KERN.
-
*Writer
Concrete Type v1.0A Writer is a connection to a syslog server.
-
Alert
Receiver for *Writer v1.0([m])
Alert logs a message with severity LOG_ALERT, ignoring the severity
passed to New.
-
Close
Receiver for *Writer v1.0([])
Close closes a connection to the syslog daemon.
-
Crit
Receiver for *Writer v1.0([m])
Crit logs a message with severity LOG_CRIT, ignoring the severity
passed to New.
-
Debug
Receiver for *Writer v1.0([m])
Debug logs a message with severity LOG_DEBUG, ignoring the severity
passed to New.
-
Emerg
Receiver for *Writer v1.0([m])
Emerg logs a message with severity LOG_EMERG, ignoring the severity
passed to New.
-
Err
Receiver for *Writer v1.0([m])
Err logs a message with severity LOG_ERR, ignoring the severity
passed to New.
-
Info
Receiver for *Writer v1.0([m])
Info logs a message with severity LOG_INFO, ignoring the severity
passed to New.
-
Notice
Receiver for *Writer v1.0([m])
Notice logs a message with severity LOG_NOTICE, ignoring the
severity passed to New.
-
Warning
Receiver for *Writer v1.0([m])
Warning logs a message with severity LOG_WARNING, ignoring the
severity passed to New.
-
Write
Receiver for *Writer v1.0([b])
Write sends a log message to the syslog daemon.
-
Priority
Concrete Type v1.0The Priority is a combination of the syslog facility and
severity. For example, LOG_ALERT | LOG_FTP sends an alert severity
message from the FTP facility. The default severity is LOG_EMERG;
the default facility is LOG_KERN.
-
Writer
Concrete Type v1.0A Writer is a connection to a syslog server.
-
arrayOfPriority
Concrete Type v1.0The Priority is a combination of the syslog facility and
severity. For example, LOG_ALERT | LOG_FTP sends an alert severity
message from the FTP facility. The default severity is LOG_EMERG;
the default facility is LOG_KERN.
-
arrayOfWriter
Concrete Type v1.0A Writer is a connection to a syslog server.