Bug 6908 - increase DEBUG level for *NOISY* Dates.pm init() messages
Summary: increase DEBUG level for *NOISY* Dates.pm init() messages
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: 3.6
Hardware: All All
: PATCH-Sent (DO NOT USE) trivial
Assignee: Mason James
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-22 09:36 UTC by Mason James
Modified: 2013-12-05 19:59 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
patch (1.15 KB, patch)
2011-09-22 09:43 UTC, Mason James
Details | Diff | Splinter Review
corrected patch :) (1.08 KB, patch)
2011-09-22 09:50 UTC, Mason James
Details | Diff | Splinter Review
Bug 6908 - increase DEBUG level for *NOISY* Dates.pm init() messages (1.07 KB, patch)
2011-12-02 08:43 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mason James 2011-09-22 09:36:22 UTC
with $DEBUG set to 1, C4:Date:init() is *very* noisy, and often writes many messages for a single page load

when debugging, these messages are often distracting and irritating

------------------------------------------------------------------------------
 mainpage.pl: (during init) @$self->{'dmy_arrayref'}: 58 25 05 29 9 107 -1 -1 1, 
 mainpage.pl: (during init) @$self->{'dmy_arrayref'}: 45 34 05 29 9 107 -1 -1 1, 
------------------------------------------------------------------------------

these messages should only be displayed with a $DEBUG value of 2, or higher
Comment 1 Mason James 2011-09-22 09:43:06 UTC Comment hidden (obsolete)
Comment 2 Mason James 2011-09-22 09:50:23 UTC Comment hidden (obsolete)
Comment 3 Chris Cormack 2011-12-02 08:43:08 UTC
Created attachment 6514 [details] [review]
Bug 6908 - increase DEBUG level for *NOISY* Dates.pm init() messages

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 4 Paul Poulain 2011-12-06 19:39:02 UTC
QA comment: one line patch, usefull, nothing to say

patch pushed, please test
Comment 5 Ian Walls 2011-12-20 21:20:24 UTC
This results in the following error types in the log:

[Thu Dec 15 16:20:43 2011] [error] [client 10.8.5.33] [Thu Dec 15 16:20:43
2011]  opac-detail.pl: Use of uninitialized value $C4::Dates::debug in numeric
gt (>)  at /usr/share/kohatest36/lib/C4/Dates.pm line 170., referer:
http://kohatest36/cgi-bin/koha/opac-search.pl?q=school+census

Looks like $debug isn't getting universally set to a numeric value.  In the cases where it's not numeric, we get the above error
Comment 6 Paul Poulain 2011-12-26 16:29:24 UTC
mason, a follow-up patch with something like
    if ($debug && $debug > 1) { warn "(during init) \@\$self->{'dmy_arrayref'}: " . join( ' ', @{ $self->{'dmy_arrayref'} } ) . "\n"; }

instead of
    if ($debug > 1) { warn "(during init) \@\$self->{'dmy_arrayref'}: " . join( ' ', @{ $self->{'dmy_arrayref'} } ) . "\n"; }

welcomed
Comment 7 Jared Camins-Esakov 2012-05-23 12:18:02 UTC
Included in 3.6 prior to 3.6.5.