[Jifty-commit] r4593 - in jifty/trunk: lib/Jifty/Plugin
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Nov 30 17:55:36 EST 2007
Author: sartak
Date: Fri Nov 30 17:55:36 2007
New Revision: 4593
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/Recorder.pm
Log:
r48460 at onn: sartak | 2007-11-30 17:55:29 -0500
Recorder: Don't install the trigger if creating the loghandle failed
Modified: jifty/trunk/lib/Jifty/Plugin/Recorder.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Recorder.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Recorder.pm Fri Nov 30 17:55:36 2007
@@ -26,15 +26,18 @@
return if $self->_pre_init;
- Jifty::Handler->add_trigger(
- before_request => sub { $self->before_request(@_) }
- );
-
$self->start(time);
$self->path($args{path});
Jifty::Util->make_path($args{path});
$self->loghandle($self->get_loghandle);
+
+ # if creating the loghandle failed, then we may as well not bother :)
+ if ($self->loghandle) {
+ Jifty::Handler->add_trigger(
+ before_request => sub { $self->before_request(@_) }
+ );
+ }
}
=head2 before_request
More information about the Jifty-commit
mailing list