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

(-)a/debian/koha-common.postinst (+16 lines)
Lines 267-270 service rabbitmq-server restart Link Here
267
update-rc.d koha-common disable
267
update-rc.d koha-common disable
268
update-rc.d koha-common enable
268
update-rc.d koha-common enable
269
269
270
for site in $(koha-list); do
271
    log4perl_config="/etc/koha/sites/$site/log4perl.conf"
272
    if ! log4perl_component $log4perl_config "worker"; then
273
        cat <<EOF >> $log4perl_config
274
log4perl.logger.worker = WARN, WORKER
275
log4perl.appender.WORKER=Log::Log4perl::Appender::Screen
276
log4perl.appender.WORKER.stderr=1
277
log4perl.appender.WORKER.mode=append
278
log4perl.appender.WORKER.layout=PatternLayout
279
log4perl.appender.WORKER.layout.ConversionPattern=[%d] [%p] %m %l%n
280
log4perl.appender.WORKER.utf8=1
281
282
EOF
283
    fi
284
done
285
270
exit 0
286
exit 0
(-)a/etc/log4perl.conf (+8 lines)
Lines 14-19 log4perl.appender.OPAC.layout=PatternLayout Link Here
14
log4perl.appender.OPAC.layout.ConversionPattern=[%d] [%p] %m %l%n
14
log4perl.appender.OPAC.layout.ConversionPattern=[%d] [%p] %m %l%n
15
log4perl.appender.OPAC.utf8=1
15
log4perl.appender.OPAC.utf8=1
16
16
17
log4perl.logger.worker = WARN, WORKER
18
log4perl.appender.WORKER=Log::Log4perl::Appender::Screen
19
log4perl.appender.WORKER.stderr=1
20
log4perl.appender.WORKER.mode=append
21
log4perl.appender.WORKER.layout=PatternLayout
22
log4perl.appender.WORKER.layout.ConversionPattern=[%d] [%p] %m %l%n
23
log4perl.appender.WORKER.utf8=1
24
17
log4perl.logger.z3950 = WARN, Z3950
25
log4perl.logger.z3950 = WARN, Z3950
18
log4perl.appender.Z3950=Log::Log4perl::Appender::File
26
log4perl.appender.Z3950=Log::Log4perl::Appender::File
19
log4perl.appender.Z3950.filename=__LOG_DIR__/z3950-error.log
27
log4perl.appender.Z3950.filename=__LOG_DIR__/z3950-error.log
(-)a/misc/background_jobs_worker.pl (-3 / +2 lines)
Lines 98-104 while (1) { Link Here
98
            my $body = $frame->body;
98
            my $body = $frame->body;
99
            decode_json($body); # TODO Should this be from_json? Check utf8 flag.
99
            decode_json($body); # TODO Should this be from_json? Check utf8 flag.
100
        } catch {
100
        } catch {
101
            Koha::Logger->get->warn(sprintf "Frame not processed - %s", $_);
101
            Koha::Logger->get({ interface => 'worker' })->warn(sprintf "Frame not processed - %s", $_);
102
            return;
102
            return;
103
        } finally {
103
        } finally {
104
            $conn->ack( { frame => $frame } );
104
            $conn->ack( { frame => $frame } );
Lines 111-117 while (1) { Link Here
111
        my $job = Koha::BackgroundJobs->find($args->{job_id});
111
        my $job = Koha::BackgroundJobs->find($args->{job_id});
112
112
113
        unless ( $job ) {
113
        unless ( $job ) {
114
            Koha::Logger->get->warn(sprintf "No job found for id=%s", $args->{job_id});
114
            Koha::Logger->get({ interface => 'worker' })->warn(sprintf "No job found for id=%s", $args->{job_id});
115
            next;
115
            next;
116
        }
116
        }
117
117
118
- 

Return to bug 32612