Versions in this module Expand all Collapse all v0 v0.0.2 Jul 6, 2021 Changes in this version + const FacilityMask + const SeverityMask + var ErrNilDialFunc = errors.New("srslog: nil DialFunc passed to DialWithCustomDialer") + func DefaultFormatter(timestamp time.Time, p Priority, hostname, tag string, content []byte) []byte + func DefaultFramer(in []byte) [][]byte + func NewLogger(p Priority, logFlag int) (*log.Logger, error) + func RFC3164Formatter(timestamp time.Time, p Priority, hostname, tag string, content []byte) []byte + func RFC5424Formatter(timestamp time.Time, p Priority, hostname, tag string, content []byte) []byte + func RFC5425MessageLengthFramer(in []byte) [][]byte + func UnixFormatter(timestamp time.Time, p Priority, _, tag string, content []byte) []byte + type DialFunc func(string, string) (net.Conn, error) + type Formatter func(timestamp time.Time, p Priority, hostname, tag string, content []byte) []byte + type Framer func(in []byte) [][]byte + type Priority int + const LOG_ALERT + const LOG_AUTH + const LOG_AUTHPRIV + const LOG_CRIT + const LOG_CRON + const LOG_DAEMON + const LOG_DEBUG + const LOG_EMERG + const LOG_ERR + const LOG_FTP + const LOG_INFO + const LOG_KERN + const LOG_LOCAL0 + const LOG_LOCAL1 + const LOG_LOCAL2 + const LOG_LOCAL3 + const LOG_LOCAL4 + const LOG_LOCAL5 + const LOG_LOCAL6 + const LOG_LOCAL7 + const LOG_LPR + const LOG_MAIL + const LOG_NEWS + const LOG_NOTICE + const LOG_SYSLOG + const LOG_USER + const LOG_UUCP + const LOG_WARNING + type Writer struct + func Dial(network, raddr string, priority Priority, tag string) (*Writer, error) + func DialWithCustomDialer(network, raddr string, priority Priority, tag string, customDial DialFunc) (*Writer, error) + func DialWithTLSCert(network, raddr string, priority Priority, tag string, serverCert []byte) (*Writer, error) + func DialWithTLSCertPath(network, raddr string, priority Priority, tag, certPath string) (*Writer, error) + func DialWithTLSConfig(network, raddr string, priority Priority, tag string, tlsConfig *tls.Config) (*Writer, error) + func New(priority Priority, tag string) (w *Writer, err error) + func (w *Writer) Alert(m string) (err error) + func (w *Writer) Close() error + func (w *Writer) Crit(m string) (err error) + func (w *Writer) Debug(m string) (err error) + func (w *Writer) Emerg(m string) (err error) + func (w *Writer) Err(m string) (err error) + func (w *Writer) Info(m string) (err error) + func (w *Writer) Notice(m string) (err error) + func (w *Writer) SetFormatter(f Formatter) + func (w *Writer) SetFramer(f Framer) + func (w *Writer) SetHostname(hostname string) + func (w *Writer) Warning(m string) (err error) + func (w *Writer) Write(b []byte) (int, error) + func (w *Writer) WriteWithPriority(p Priority, b []byte) (int, error) + func (w *Writer) WriteWithTimestamp(timestamp time.Time, b []byte) (int, error) + func (w *Writer) WriteWithTimestampAndPriority(timestamp time.Time, p Priority, b []byte) (int, error)