1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-05-01 09:05:27 +00:00

maillog: Remove unnecessary newlines

This patch removes the unnecessary newlines in the maillog printf calls.

Note that the library will trim them anyway, so this is only for code
readability, but the logs should be unchanged.
This commit is contained in:
Alberto Bertogli
2026-04-06 19:27:56 +01:00
parent 013af62116
commit e78d5043e3

View File

@@ -87,7 +87,7 @@ func (l *Logger) Reopen() error {
// Listening logs that the daemon is listening on the given address. // Listening logs that the daemon is listening on the given address.
func (l *Logger) Listening(a string) { func (l *Logger) Listening(a string) {
l.printf("daemon listening on %s\n", a) l.printf("daemon listening on %s", a)
} }
// Auth logs an authentication request. // Auth logs an authentication request.
@@ -110,33 +110,33 @@ func (l *Logger) Rejected(netAddr net.Addr, from string, to []string, err string
if len(to) > 0 { if len(to) > 0 {
toStr = fmt.Sprintf(" to=%v", to) toStr = fmt.Sprintf(" to=%v", to)
} }
l.printf("%s rejected%s%s - %v\n", netAddr, from, toStr, err) l.printf("%s rejected%s%s - %v", netAddr, from, toStr, err)
} }
// Queued logs that we have queued an email. // Queued logs that we have queued an email.
func (l *Logger) Queued(netAddr net.Addr, from string, to []string, id string) { func (l *Logger) Queued(netAddr net.Addr, from string, to []string, id string) {
l.printf("%s from=%s queued ip=%s to=%v\n", id, from, netAddr, to) l.printf("%s from=%s queued ip=%s to=%v", id, from, netAddr, to)
} }
// SendAttempt logs that we have attempted to send an email. // SendAttempt logs that we have attempted to send an email.
func (l *Logger) SendAttempt(id, from, to string, err error, permanent bool) { func (l *Logger) SendAttempt(id, from, to string, err error, permanent bool) {
if err == nil { if err == nil {
l.printf("%s from=%s to=%s sent\n", id, from, to) l.printf("%s from=%s to=%s sent", id, from, to)
} else { } else {
t := "(temporary)" t := "(temporary)"
if permanent { if permanent {
t = "(permanent)" t = "(permanent)"
} }
l.printf("%s from=%s to=%s failed %s: %v\n", id, from, to, t, err) l.printf("%s from=%s to=%s failed %s: %v", id, from, to, t, err)
} }
} }
// QueueLoop logs that we have completed a queue loop. // QueueLoop logs that we have completed a queue loop.
func (l *Logger) QueueLoop(id, from string, nextDelay time.Duration) { func (l *Logger) QueueLoop(id, from string, nextDelay time.Duration) {
if nextDelay > 0 { if nextDelay > 0 {
l.printf("%s from=%s completed loop, next in %v\n", id, from, nextDelay) l.printf("%s from=%s completed loop, next in %v", id, from, nextDelay)
} else { } else {
l.printf("%s from=%s all done\n", id, from) l.printf("%s from=%s all done", id, from)
} }
} }