mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-22 15:27:02 +00:00
Improve debugging and tracing information
This patch reviews various debug and informational messages, making more uniform use of tracing, and extends the monitoring http server with useful information like an index and a queue dump.
This commit is contained in:
@@ -26,14 +26,14 @@ type Procmail struct {
|
||||
}
|
||||
|
||||
func (p *Procmail) Deliver(from string, to string, data []byte) (error, bool) {
|
||||
tr := trace.New("Procmail", "Deliver")
|
||||
tr := trace.New("Procmail.Courier", to)
|
||||
defer tr.Finish()
|
||||
|
||||
// Sanitize, just in case.
|
||||
from = sanitizeForProcmail(from)
|
||||
to = sanitizeForProcmail(to)
|
||||
|
||||
tr.LazyPrintf("%s -> %s", from, to)
|
||||
tr.Debugf("%s -> %s", from, to)
|
||||
|
||||
// Prepare the command, replacing the necessary arguments.
|
||||
replacer := strings.NewReplacer(
|
||||
@@ -97,6 +97,7 @@ func (p *Procmail) Deliver(from string, to string, data []byte) (error, bool) {
|
||||
return err, permanent
|
||||
}
|
||||
|
||||
tr.Debugf("delivered")
|
||||
return nil, false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user