1
0
mirror of https://github.com/golang/go synced 2024-11-24 22:57:57 -07:00

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
This commit is contained in:
Vadim Vygonets 2011-12-26 09:34:27 +09:00 committed by Mikio Hara
parent 98b90475ac
commit f71c03af90

View File

@ -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