Log even when we aren't in a transaction

This should allow the logging/file plugin to log even if it isn't called from
within a transaction
This commit is contained in:
Jared Johnson 2009-08-14 15:56:36 -05:00 committed by Ask Bjørn Hansen
parent b93608f27a
commit b130e6a59e

View File

@ -263,13 +263,15 @@ sub hook_logging {
# - It's not already open # - It's not already open
# - We're allowed to split sessions across logfiles # - We're allowed to split sessions across logfiles
# - We haven't logged anything yet this session # - We haven't logged anything yet this session
# - We aren't in a session
if (!$self->{_f} || if (!$self->{_f} ||
!$self->{_nosplit} || !$self->{_nosplit} ||
!$transaction ||
!$transaction->notes('file-logged-this-session')) { !$transaction->notes('file-logged-this-session')) {
unless (defined $self->maybe_reopen($transaction)) { unless (defined $self->maybe_reopen($transaction)) {
return DECLINED; return DECLINED;
} }
$transaction->notes('file-logged-this-session', 1); $transaction->notes('file-logged-this-session', 1) if $transaction;
} }
my $f = $self->{_f}; my $f = $self->{_f};