summaryrefslogtreecommitdiff
path: root/sd_daemon/log.go
diff options
context:
space:
mode:
Diffstat (limited to 'sd_daemon/log.go')
-rw-r--r--sd_daemon/log.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/sd_daemon/log.go b/sd_daemon/log.go
index dc77907..1bdf65f 100644
--- a/sd_daemon/log.go
+++ b/sd_daemon/log.go
@@ -74,9 +74,9 @@ func appendPrefix(buf []byte, n syslog.Priority) []byte {
return append(buf, b[i:]...)
}
-// WriteString writes a message with the specified priority to the
+// LogString writes a message with the specified priority to the
// log.
-func (l *Logger) WriteString(pri syslog.Priority, msg string) (n int, err error) {
+func (l *Logger) LogString(pri syslog.Priority, msg string) (n int, err error) {
l.mu.Lock()
defer l.mu.Unlock()
@@ -111,10 +111,10 @@ func (l *Logger) WriteString(pri syslog.Priority, msg string) (n int, err error)
return l.out.Write(l.buf)
}
-// WriteBytes writes a message with the specified priority to the
+// LogBytes writes a message with the specified priority to the
// log.
-func (l *Logger) WriteBytes(pri syslog.Priority, msg []byte) (n int, err error) {
- // Copy/pasted from WriteString and
+func (l *Logger) LogBytes(pri syslog.Priority, msg []byte) (n int, err error) {
+ // Copy/pasted from LogString and
// * `strings.` -> `bytes.`
// * `"\n"` -> `[]byte{'\n'}`
l.mu.Lock()
@@ -151,7 +151,7 @@ type loggerWriter struct {
}
func (lw loggerWriter) Write(p []byte) (n int, err error) {
- return lw.log.WriteBytes(lw.pri, p)
+ return lw.log.LogBytes(lw.pri, p)
}
// Writer returns an io.Writer that writes messages with the specified