Add config to enable content log, on by default
This commit is contained in:
parent
50badecc48
commit
59ae9643e0
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user