Add config to enable content log, on by default

This commit is contained in:
Jared Johnson 2014-12-02 16:51:51 -06:00
parent 50badecc48
commit 59ae9643e0

View File

@ -5,7 +5,15 @@
use POSIX qw:strftime:; use POSIX qw:strftime:;
sub hook_data_post { sub register {
my ( $self, $qp ) = @_;
my $enabled = $qp->config('enable_content_log');
$enabled = 'true' if ! defined $enabled;
return if lc($enabled) ne 'true';
$self->register_hook('data_post', 'data_post_handler');
}
sub data_post_handler {
my ($self, $transaction) = @_; my ($self, $transaction) = @_;
open my $out, '>>', $self->content_log_file; open my $out, '>>', $self->content_log_file;