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

(-)a/C4/SIP/SIPServer.pm (+8 lines)
Lines 105-110 sub process_request { Link Here
105
    $self->{account} = undef;  # Clear out the account from the last request, it may be different
105
    $self->{account} = undef;  # Clear out the account from the last request, it may be different
106
    $self->{logger} = set_logger( Koha::Logger->get( { interface => 'sip' } ) );
106
    $self->{logger} = set_logger( Koha::Logger->get( { interface => 'sip' } ) );
107
107
108
    # Flush previous MDCs to prevent accidentally leaking incorrect MDC-entries
109
    Log::Log4perl::MDC->put( "accountid", undef );
110
    Log::Log4perl::MDC->put( "peeraddr",  undef );
111
108
    my $sockname = getsockname(STDIN);
112
    my $sockname = getsockname(STDIN);
109
113
110
    # Check if socket connection is IPv6 before resolving address
114
    # Check if socket connection is IPv6 before resolving address
Lines 179-184 sub raw_transport { Link Here
179
        )
183
        )
180
    );
184
    );
181
185
186
    # Set MDCs after properly authenticating
187
    Log::Log4perl::MDC->put( "accountid", $self->{account}->{id} );
188
    Log::Log4perl::MDC->put( "peeraddr",  $self->{server}->{peeraddr} );
189
182
    siplog("LOG_DEBUG", "raw_transport: uname/inst: '%s/%s'",
190
    siplog("LOG_DEBUG", "raw_transport: uname/inst: '%s/%s'",
183
        $self->{account}->{id},
191
        $self->{account}->{id},
184
        $self->{account}->{institution});
192
        $self->{account}->{institution});
(-)a/debian/koha-common.postinst (-1 / +1 lines)
Lines 182-188 log4perl.appender.SIP=Log::Log4perl::Appender::File Link Here
182
log4perl.appender.SIP.filename=/var/log/koha/$site/sip.log
182
log4perl.appender.SIP.filename=/var/log/koha/$site/sip.log
183
log4perl.appender.SIP.mode=append
183
log4perl.appender.SIP.mode=append
184
log4perl.appender.SIP.layout=PatternLayout
184
log4perl.appender.SIP.layout=PatternLayout
185
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %m %l %n
185
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n
186
log4perl.appender.SIP.utf8=1
186
log4perl.appender.SIP.utf8=1
187
187
188
EOF
188
EOF
(-)a/debian/templates/log4perl-site.conf.in (-1 / +1 lines)
Lines 35-39 log4perl.appender.SIP=Log::Log4perl::Appender::File Link Here
35
log4perl.appender.SIP.filename=__LOG_DIR__/sip.log
35
log4perl.appender.SIP.filename=__LOG_DIR__/sip.log
36
log4perl.appender.SIP.mode=append
36
log4perl.appender.SIP.mode=append
37
log4perl.appender.SIP.layout=PatternLayout
37
log4perl.appender.SIP.layout=PatternLayout
38
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %m %l %n
38
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n
39
log4perl.appender.SIP.utf8=1
39
log4perl.appender.SIP.utf8=1
(-)a/etc/log4perl.conf (-2 / +1 lines)
Lines 35-39 log4perl.appender.SIP=Log::Log4perl::Appender::File Link Here
35
log4perl.appender.SIP.filename=__LOG_DIR__/sip.log
35
log4perl.appender.SIP.filename=__LOG_DIR__/sip.log
36
log4perl.appender.SIP.mode=append
36
log4perl.appender.SIP.mode=append
37
log4perl.appender.SIP.layout=PatternLayout
37
log4perl.appender.SIP.layout=PatternLayout
38
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %m %l %n
38
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n
39
log4perl.appender.SIP.utf8=1
39
log4perl.appender.SIP.utf8=1
40
- 

Return to bug 25464