You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2009/08/13 17:10:34 UTC
svn commit: r803923 - /spamassassin/trunk/lib/Mail/SpamAssassin/Logger.pm
Author: mmartinec
Date: Thu Aug 13 15:10:34 2009
New Revision: 803923
URL: http://svn.apache.org/viewvc?rev=803923&view=rev
Log:
Make sure the dbg() and info() calls always return the
same value (true) regardless of log level - some code
is/was making unsound assumptions on the return value,
e.g. $s = IO::Socket::UNIX->new || dbg("...") && die
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Logger.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Logger.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Logger.pm?rev=803923&r1=803922&r2=803923&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Logger.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Logger.pm Thu Aug 13 15:10:34 2009
@@ -197,8 +197,8 @@
=cut
sub dbg {
- return unless $LOG_SA{level} >= DBG;
- _log(DBG, @_);
+ _log(DBG, @_) if $LOG_SA{level} >= DBG;
+ 1; # always return the same simple value, regardless of log level
}
=item info("facility: message")
@@ -210,8 +210,8 @@
=cut
sub info {
- return unless $LOG_SA{level} >= INFO;
- _log(INFO, @_);
+ _log(INFO, @_) if $LOG_SA{level} >= INFO;
+ 1; # always return the same simple value, regardless of log level
}
# remember to avoid deep recursion, my friend