From: Vadim Vygonets Date: Mon, 26 Dec 2011 00:34:27 +0000 (+0900) Subject: log/syslog: add Alert method X-Git-Tag: weekly.2012-01-15~170 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f71c03af90d29c6e2e8d5cc13ac9c590c6e7e2b9;p=gostls13.git log/syslog: add Alert method Alert logs a message using the LOG_ALERT priority. Fixes #2325. R=mikioh.mikioh, rsc CC=golang-dev https://golang.org/cl/5504058 --- diff --git a/src/pkg/log/syslog/syslog.go b/src/pkg/log/syslog/syslog.go index 914391af80..aef63480f1 100644 --- a/src/pkg/log/syslog/syslog.go +++ b/src/pkg/log/syslog/syslog.go @@ -93,13 +93,19 @@ func (w *Writer) Emerg(m string) (err error) { return err } +// Alert logs a message using the LOG_ALERT priority. +func (w *Writer) Alert(m string) (err error) { + _, err = w.writeString(LOG_ALERT, m) + return err +} + // Crit logs a message using the LOG_CRIT priority. func (w *Writer) Crit(m string) (err error) { _, err = w.writeString(LOG_CRIT, m) return err } -// ERR logs a message using the LOG_ERR priority. +// Err logs a message using the LOG_ERR priority. func (w *Writer) Err(m string) (err error) { _, err = w.writeString(LOG_ERR, m) return err