OneTicketPerRequestor: Add debug logging.
This commit is contained in:
parent
13d6d49af0
commit
daeabc1aa6
1 changed files with 5 additions and 0 deletions
|
@ -46,6 +46,7 @@ sub ReadHeader {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub BeforeDecrypt {
|
sub BeforeDecrypt {
|
||||||
|
$RT::Logger->debug("Entered OneTicketPerRequestor BeforeDecrypt");
|
||||||
my %args = (
|
my %args = (
|
||||||
Message => undef,
|
Message => undef,
|
||||||
RawMessage => undef,
|
RawMessage => undef,
|
||||||
|
@ -57,9 +58,11 @@ sub BeforeDecrypt {
|
||||||
my $queue_name = $args{Queue}->Name;
|
my $queue_name = $args{Queue}->Name;
|
||||||
my $sort_orders = $QUEUES{$queue_name};
|
my $sort_orders = $QUEUES{$queue_name};
|
||||||
if (!defined($sort_orders)) {
|
if (!defined($sort_orders)) {
|
||||||
|
$RT::Logger->debug("OTPR stopping: Not configured for $queue_name");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
elsif (RT::Interface::Email::ExtractTicketId($args{Message})) {
|
elsif (RT::Interface::Email::ExtractTicketId($args{Message})) {
|
||||||
|
$RT::Logger->debug("OTPR stopping: Message already has ticket ID");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
my $headers = $args{Message}->head();
|
my $headers = $args{Message}->head();
|
||||||
|
@ -90,6 +93,8 @@ sub BeforeDecrypt {
|
||||||
|
|
||||||
my $dest_ticket = $ticket_search->First;
|
my $dest_ticket = $ticket_search->First;
|
||||||
if (!defined($dest_ticket)) {
|
if (!defined($dest_ticket)) {
|
||||||
|
$RT::Logger->debug(sprintf("OTPR stopping: No ticket found from <%s> in queue %s",
|
||||||
|
$from_address, $queue_name));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$RT::Logger->info(sprintf("OTPR: Redirecting email from <%s> to ticket #%s",
|
$RT::Logger->info(sprintf("OTPR: Redirecting email from <%s> to ticket #%s",
|
||||||
|
|
Loading…
Reference in a new issue