Bug 4536 - [review] avoid breakage when a "warn" event happens before Mail::SA::Logger is loaded
Summary: [review] avoid breakage when a "warn" event happens before Mail::SA::Logger i...
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 3.1.0
Hardware: Other other
: P5 normal
Target Milestone: 3.1.0
Assignee: Justin Mason
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-16 20:08 UTC by Justin Mason
Modified: 2005-08-19 12:04 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
fix patch None Justin Mason [HasCLA]
fix r2 patch None Justin Mason [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Mason 2005-08-16 20:08:27 UTC
if there's a warn-level event during class loading, before Mail::SA::Logger is
loaded, the current code dies with a useless message:

Undefined subroutine &main::log_message called at ./spamassassin line 33.
Compilation failed in require at ./spamassassin line 81.
BEGIN failed--compilation aborted at ./spamassassin line 81.

patch to follow.

btw, sa-learn does not use Mail::SA::Logger.  should it?
Comment 1 Justin Mason 2005-08-16 20:08:52 UTC
Created attachment 3079 [details]
fix

please vote.
Comment 2 Justin Mason 2005-08-16 20:10:11 UTC
in trunk, r233111.  please vote for 3.1.0.  I think it's pretty trivial btw ;)

Comment 3 Michael Parker 2005-08-16 20:27:30 UTC
Seems to be more than that in this patch.
Comment 4 Justin Mason 2005-08-16 20:33:08 UTC
Created attachment 3080 [details]
fix r2

duh.  yep, the hazards of using a small terminal window! here's the subset that
fixes the bug...
Comment 5 Duncan Findlay 2005-08-19 16:04:03 UTC
+1
Comment 6 Sidney Markowitz 2005-08-19 16:39:20 UTC
+1
Comment 7 Justin Mason 2005-08-19 20:04:41 UTC
233992.