Nick Clemens
3b1f2c57ea
To test: 1 - Apply patch 2 - vim /etc/koha/sites/kohadev/log4perl.conf, Add lines below: log4perl.logger.worker = WARN, WORKER log4perl.appender.WORKER=Log::Log4perl::Appender::Screen log4perl.appender.WORKER.stderr=1 log4perl.appender.WORKER.mode=append log4perl.appender.WORKER.layout=PatternLayout log4perl.appender.WORKER.layout.ConversionPattern=[%d] [%p] %m %l%n log4perl.appender.WORKER.utf8=1 3 - Restart all 4 - Edit misc/background_jobs_worker.pl - my $job = Koha::BackgroundJobs->find($args->{job_id}); + my $job;# = Koha::BackgroundJobs->find($args->{job_id}); 5 - In another terminal: tail -f /var/log/koha/kohadev/koha-worker-error.log 6 - Force enqueue a job (that won't be found because of #4 perl -e 'use Koha::BackgroundJob::BatchUpdateItem; my $bg = Koha::BackgroundJob::BatchUpdateItem->new(); $bg->enqueue({ record_ids=>['888888']});' 7 - Note error in log like: [2023/01/11 19:26:10] [WARN] No job found for id=2983 main:: /kohadevbox/koha/misc/background_jobs_worker.pl (111) Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
71 lines
3 KiB
Text
71 lines
3 KiB
Text
log4perl.logger.intranet = WARN, INTRANET
|
|
log4perl.appender.INTRANET=Log::Log4perl::Appender::File
|
|
log4perl.appender.INTRANET.filename=__LOG_DIR__/intranet-error.log
|
|
log4perl.appender.INTRANET.mode=append
|
|
log4perl.appender.INTRANET.layout=PatternLayout
|
|
log4perl.appender.INTRANET.layout.ConversionPattern=[%d] [%p] %m %l%n
|
|
log4perl.appender.INTRANET.utf8=1
|
|
|
|
log4perl.logger.opac = WARN, OPAC
|
|
log4perl.appender.OPAC=Log::Log4perl::Appender::File
|
|
log4perl.appender.OPAC.filename=__LOG_DIR__/opac-error.log
|
|
log4perl.appender.OPAC.mode=append
|
|
log4perl.appender.OPAC.layout=PatternLayout
|
|
log4perl.appender.OPAC.layout.ConversionPattern=[%d] [%p] %m %l%n
|
|
log4perl.appender.OPAC.utf8=1
|
|
|
|
log4perl.logger.worker = WARN, WORKER
|
|
log4perl.appender.WORKER=Log::Log4perl::Appender::Screen
|
|
log4perl.appender.WORKER.stderr=1
|
|
log4perl.appender.WORKER.mode=append
|
|
log4perl.appender.WORKER.layout=PatternLayout
|
|
log4perl.appender.WORKER.layout.ConversionPattern=[%d] [%p] %m %l%n
|
|
log4perl.appender.WORKER.utf8=1
|
|
|
|
log4perl.logger.z3950 = WARN, Z3950
|
|
log4perl.appender.Z3950=Log::Log4perl::Appender::File
|
|
log4perl.appender.Z3950.filename=__LOG_DIR__/z3950-error.log
|
|
log4perl.appender.Z3950.mode=append
|
|
log4perl.appender.Z3950.layout=PatternLayout
|
|
log4perl.appender.Z3950.layout.ConversionPattern=[%d] [%p] %m %l%n
|
|
log4perl.appender.Z3950.utf8=1
|
|
|
|
log4perl.logger.api = WARN, API
|
|
log4perl.appender.API=Log::Log4perl::Appender::File
|
|
log4perl.appender.API.filename=__LOG_DIR__/api-error.log
|
|
log4perl.appender.API.mode=append
|
|
log4perl.appender.API.layout=PatternLayout
|
|
log4perl.appender.API.layout.ConversionPattern=[%d] [%p] %m %l%n
|
|
log4perl.appender.API.utf8=1
|
|
|
|
log4perl.logger.sip = DEBUG, SIP
|
|
log4perl.appender.SIP=Log::Log4perl::Appender::File
|
|
log4perl.appender.SIP.filename=__LOG_DIR__/sip.log
|
|
log4perl.appender.SIP.mode=append
|
|
log4perl.appender.SIP.layout=PatternLayout
|
|
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%P] [%p] %X{accountid}@%X{peeraddr}: %m %l%n
|
|
log4perl.appender.SIP.utf8=1
|
|
|
|
log4perl.logger.plack-opac = WARN, PLACKOPAC
|
|
log4perl.appender.PLACKOPAC=Log::Log4perl::Appender::File
|
|
log4perl.appender.PLACKOPAC.filename=__LOG_DIR__/plack-opac-error.log
|
|
log4perl.appender.PLACKOPAC.mode=append
|
|
log4perl.appender.PLACKOPAC.layout=PatternLayout
|
|
log4perl.appender.PLACKOPAC.layout.ConversionPattern=[%d] [%p] %m%n
|
|
log4perl.appender.PLACKOPAC.utf8=1
|
|
|
|
log4perl.logger.plack-api = WARN, PLACKAPI
|
|
log4perl.appender.PLACKAPI=Log::Log4perl::Appender::File
|
|
log4perl.appender.PLACKAPI.filename=__LOG_DIR__/plack-api-error.log
|
|
log4perl.appender.PLACKAPI.mode=append
|
|
log4perl.appender.PLACKAPI.layout=PatternLayout
|
|
log4perl.appender.PLACKAPI.layout.ConversionPattern=[%d] [%p] %m%n
|
|
log4perl.appender.PLACKAPI.utf8=1
|
|
|
|
log4perl.logger.plack-intranet = WARN, PLACKINTRANET
|
|
log4perl.appender.PLACKINTRANET=Log::Log4perl::Appender::File
|
|
log4perl.appender.PLACKINTRANET.filename=__LOG_DIR__/plack-intranet-error.log
|
|
log4perl.appender.PLACKINTRANET.mode=append
|
|
log4perl.appender.PLACKINTRANET.layout=PatternLayout
|
|
log4perl.appender.PLACKINTRANET.layout.ConversionPattern=[%d] [%p] %m%n
|
|
log4perl.appender.PLACKINTRANET.utf8=1
|