Improve and harmonize logging in EDI scripts
Bug #863445 reported by
Lebbeous Fogle-Weekley
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
This affects Evergreen 2.0+.
edi_fetcher.pl and edi_pusher.pl do their logging inconsistently (both between the two scripts and within them).
You'll find print, print STDERR, die, and use of OpenSRF:
Making these scripts do all feasible logging with OpenSRF:
For bonus points, enhance the logging to tell us even more about what's going on in those scripts.
Changed in evergreen: | |
status: | New → Incomplete |
Changed in evergreen: | |
status: | Incomplete → Triaged |
tags: | added: edi |
tags: |
added: acq-edi removed: edi |
tags: | added: acq |
To post a comment you must log in.
I have looked at docs.evergreen- ils.org/ 1.6/draft/ html/writing_ an_opensrf_ service. html evergreen- ils.org/ dokuwiki/ doku.php? id=opensrf: 1.2:install) :Utils: :Logger in
(http://
under Error! Warning! Info! Debug!) and
(http://
and thought of using the logger in OpenSRF:
edi_pusher.pl script. The logging levels ERROR, WARNING, INFO, DEBUG,
INTERNAL will help the user in great deal when trying to troubleshoot
the code.
So my attempt was to use $logger->info(), $logger->error(), >internal( ), $logger->debug() according to the information in
$logger-
the places of print, print STDERR and die. But I do have a little
concern about the logging levels discrimination and how could I decide
which log goes to which level ? I have here with attached the fixed
edi_pusher.pl and edi_fetcher.pl scripts in the fix.zip file.