View | Details | Raw Unified | Return to bug 15253
Collapse All | Expand All

(-)a/C4/SIP/SIPServer.pm (-1 / +2 lines)
Lines 6-12 use warnings; Link Here
6
use FindBin qw($Bin);
6
use FindBin qw($Bin);
7
use lib "$Bin";
7
use lib "$Bin";
8
use Sys::Syslog qw(syslog);
8
use Sys::Syslog qw(syslog);
9
use Koha::Logger;
10
use Net::Server::PreFork;
9
use Net::Server::PreFork;
11
use IO::Socket::INET;
10
use IO::Socket::INET;
12
use Socket qw(:DEFAULT :crlf);
11
use Socket qw(:DEFAULT :crlf);
Lines 19-24 use C4::SIP::Sip::MsgType qw( handle login_core ); Link Here
19
use C4::SIP::Sip qw( read_SIP_packet );
18
use C4::SIP::Sip qw( read_SIP_packet );
20
19
21
use Koha::Logger;
20
use Koha::Logger;
21
use C4::SIP::Trapper;
22
tie *STDERR, "C4::SIP::Trapper";
22
23
23
use base qw(Net::Server::PreFork);
24
use base qw(Net::Server::PreFork);
24
25
(-)a/C4/SIP/Trapper.pm (-1 / +21 lines)
Line 0 Link Here
0
- 
1
package C4::SIP::Trapper;
2
3
use Modern::Perl;
4
5
use Koha::Logger;
6
7
sub TIEHANDLE {
8
    my $class = shift;
9
    bless [], $class;
10
}
11
12
sub PRINT {
13
    my $self = shift;
14
    $Log::Log4perl::caller_depth++;
15
    my $logger = Koha::Logger->get({ interface => 'sip', category => 'STDERR' });
16
    warn @_;
17
    $logger->error(@_);
18
    $Log::Log4perl::caller_depth--;
19
}
20
21
1;

Return to bug 15253