Summary: | Use Koha::Logger in longoverdue.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Srdjan Jankovic <srdjan> |
Component: | Circulation | Assignee: | Srdjan Jankovic <srdjan> |
Status: | In Discussion --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | f.demians, florent.mara, gmcharlt, kyle.m.hall, m.de.rooy |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
bug_15538: Koha::Logger in longoverdue.pl
bug_15538: Koha::Logger in longoverdue.pl |
Description
Srdjan Jankovic
2016-01-11 03:23:44 UTC
Created attachment 46470 [details] [review] bug_15538: Koha::Logger in longoverdue.pl * Removed --verbose option and replaved verbose prints with $logger->debug() I can't make it work on master. Commit 347d12c41f9ebe may have broken Koha::Logger on master. For me, the logger is never instantiated. After modifying Koha::Logger to bypass conf file checking, I get a result in the OPAC log file. (In reply to Frédéric Demians from comment #2) > I can't make it work on master. Commit 347d12c41f9ebe may have broken > Koha::Logger on master. For me, the logger is never instantiated. After > modifying Koha::Logger to bypass conf file checking, I get a result in the > OPAC log file. Not sure why. I am supplying a conf file via LOG4PERL_CONF variable. What is your situation? Failed to apply this patch. Appear to be due to Koha::Borrowers now being superseded by Koha::Patrons. Applying: bug_15538: Koha::Logger in longoverdue.pl Using index info to reconstruct a base tree... M misc/cronjobs/longoverdue.pl Falling back to patching base and 3-way merge... Auto-merging misc/cronjobs/longoverdue.pl CONFLICT (content): Merge conflict in misc/cronjobs/longoverdue.pl Failed to merge in the changes. Patch failed at 0001 bug_15538: Koha::Logger in longoverdue.pl Could you please provide a test plan to help validate this patch? Created attachment 51554 [details] [review] bug_15538: Koha::Logger in longoverdue.pl * Removed --verbose option and replaved verbose prints with $logger->info() Applied the following SQL to create a long overdue item and got the expected log print out in stdout. INSERT INTO biblio(frameworkcode, datecreated) values ('allo', '2016-05-17'); INSERT INTO biblioitems(biblionumber, volume) value ((SELECT biblionumber FROM biblio WHERE frameworkcode = 'allo'), 'blah'); INSERT INTO items(biblionumber, biblioitemnumber, barcode) values (1, (SELECT biblioitemnumber FROM biblioitems WHERE volume = 'blah'), 'barcode'); INSERT INTO items(biblionumber, biblioitemnumber, barcode) values (1, (SELECT biblioitemnumber FROM biblioitems WHERE volume = 'blah'), 'latecode'); INSERT INTO borrowers(surname, address, city, branchcode, categorycode) values ('surname', 'address', 'city', 'CPL', 'B'); INSERT INTO issues (borrowernumber, itemnumber, date_due) values ( (SELECT borrowernumber FROM borrowers WHERE surname = 'surname'), (SELECT itemnumber FROM items WHERE barcode = 'barcode'), '2016-05-17'); INSERT INTO issues (borrowernumber, itemnumber, date_due) values ( (SELECT borrowernumber FROM borrowers WHERE surname = 'surname'), (SELECT itemnumber FROM items WHERE barcode = 'latecode'), '2015-07-17'); Do we really want to replace verbose options in cmdline scripts by logger calls? The first comment speaks about debug prints, but you are removing the verbose option too. I would like to see some more consensus about doing so. Maybe ask the dev list? In Discussion |