[rt-commit] CVS commit: rt

Tobias Brox tobiasb at tobiasb.funcom.com
Fri Jul 21 05:58:30 EDT 2000


   #Now that we know the self
-  (my $code, my $message) = $self->SUPER::_Set("EffectiveId",$id);
-  if ($code == 0) {
-    warn $message;
+  (my $error, my $message) = $self->SUPER::_Set("EffectiveId",$id);
+  if ($error == 0) {
+    $RT::Logger->log(level=>'warning', 
+                        message=>"Couldn't set EffectiveId for Ticket
$id: $messag
e.");
     return (0, 0, $message);
   }


Isn't it a bit strange to have a variable "error" that is true if
everything is OK and false if there was an error?

Until we can get the logger log code position, I'd rather prefer to use
"warn" and "carp" for things that aren't supposed to happen that explicit
warning loggings. Btw, in latest version of Log::Dispatcher, it's possible
to write $Logger->warn("blahblah") - and I think a library of useful
callbacks printing useful information as date, time, code position, etc is
on the way.

-- 
Spell checkers are for wimps
(please send feedback on all typos)







More information about the Rt-commit mailing list