Increased log level of SMTP commands and responses to LOGINFO.
These may be useful during normal operations. git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@685 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
c581b10628
commit
469c01a1f4
@ -75,7 +75,7 @@ sub read_input {
|
|||||||
while (<STDIN>) {
|
while (<STDIN>) {
|
||||||
alarm 0;
|
alarm 0;
|
||||||
$_ =~ s/\r?\n$//s; # advanced chomp
|
$_ =~ s/\r?\n$//s; # advanced chomp
|
||||||
$self->log(LOGDEBUG, "dispatching $_");
|
$self->log(LOGINFO, "dispatching $_");
|
||||||
$self->connection->notes('original_string', $_);
|
$self->connection->notes('original_string', $_);
|
||||||
defined $self->dispatch(split / +/, $_, 2)
|
defined $self->dispatch(split / +/, $_, 2)
|
||||||
or $self->respond(502, "command unrecognized: '$_'");
|
or $self->respond(502, "command unrecognized: '$_'");
|
||||||
@ -89,7 +89,7 @@ sub respond {
|
|||||||
my $buf = '';
|
my $buf = '';
|
||||||
while (my $msg = shift @messages) {
|
while (my $msg = shift @messages) {
|
||||||
my $line = $code . (@messages?"-":" ").$msg;
|
my $line = $code . (@messages?"-":" ").$msg;
|
||||||
$self->log(LOGDEBUG, $line);
|
$self->log(LOGINFO, $line);
|
||||||
$buf .= "$line\r\n";
|
$buf .= "$line\r\n";
|
||||||
}
|
}
|
||||||
print $buf or ($self->log(LOGERROR, "Could not print [$buf]: $!"), return 0);
|
print $buf or ($self->log(LOGERROR, "Could not print [$buf]: $!"), return 0);
|
||||||
@ -98,7 +98,7 @@ sub respond {
|
|||||||
|
|
||||||
sub disconnect {
|
sub disconnect {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->log(LOGDEBUG,"click, disconnecting");
|
$self->log(LOGINFO,"click, disconnecting");
|
||||||
$self->SUPER::disconnect(@_);
|
$self->SUPER::disconnect(@_);
|
||||||
$self->run_hooks("post-connection");
|
$self->run_hooks("post-connection");
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user