You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by ms...@apache.org on 2004/12/02 23:17:30 UTC
svn commit: r109570 - /spamassassin/trunk/lib/Mail/SpamAssassin.pm
Author: mss
Date: Thu Dec 2 14:17:29 2004
New Revision: 109570
URL: http://svn.apache.org/viewcvs?view=rev&rev=109570
Log:
Fix logging of multi-line string. Each line is preceded with ts own "debug: ${facility}:". Made that space a tab so debugging looks nicer :)
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin.pm
Url: http://svn.apache.org/viewcvs/spamassassin/trunk/lib/Mail/SpamAssassin.pm?view=diff&rev=109570&p1=spamassassin/trunk/lib/Mail/SpamAssassin.pm&r1=109569&p2=spamassassin/trunk/lib/Mail/SpamAssassin.pm&r2=109570
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin.pm Thu Dec 2 14:17:29 2004
@@ -1634,13 +1634,15 @@
my $facility = "generic";
my $message = shift;
- if ($message =~ /^(\S+?):\s*(.*)/) {
+ if ($message =~ /^(\S+?):\s*(.*)/s) {
$facility = $1;
$message = $2;
}
if ($facilities{all} || $facilities{$facility}) {
- warn "debug: $facility: $message\n";
+ $message =~ s/\n+$//s;
+ $message =~ s/^/debug: ${facility}:\t/mg;
+ warn "$message\n";
}
}
Re: svn commit: r109570 - /spamassassin/trunk/lib/Mail/SpamAssassin.pm
Posted by "Malte S. Stretz" <ms...@gmx.net>.
On Friday 03 December 2004 12:39 CET Daniel Quinlan wrote:
> mss@apache.org writes:
> > Fix logging of multi-line string. Each line is preceded with ts own
> > "debug: ${facility}:".
>
> +1
>
> > Made that space a tab so debugging looks nicer :)
>
> -1 on the change from space to tab
>
> I don't think the tab is needed and it's definitely non-standard and
> rather ugly in practice.
I thought it looked nicer (makes the line noise a bit better to read), but
feel free to change it to a space again.
Cheers,
Malte
--
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
<http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
<http://www.catb.org/~esr/faqs/smart-questions.html>
Re: svn commit: r109570 - /spamassassin/trunk/lib/Mail/SpamAssassin.pm
Posted by Daniel Quinlan <qu...@pathname.com>.
mss@apache.org writes:
> Fix logging of multi-line string. Each line is preceded with ts own
> "debug: ${facility}:".
+1
> Made that space a tab so debugging looks nicer :)
-1 on the change from space to tab
I don't think the tab is needed and it's definitely non-standard and
rather ugly in practice.
--
Daniel Quinlan
http://www.pathname.com/~quinlan/
Re: svn commit: r109570 - /spamassassin/trunk/lib/Mail/SpamAssassin.pm
Posted by Daniel Quinlan <qu...@pathname.com>.
mss@apache.org writes:
> Fix logging of multi-line string. Each line is preceded with ts own
> "debug: ${facility}:".
+1
> Made that space a tab so debugging looks nicer :)
-1 on the change from space to tab
I don't think the tab is needed and it's definitely non-standard and
rather ugly in practice.
--
Daniel Quinlan
http://www.pathname.com/~quinlan/