Improve and harmonize logging in EDI scripts

Reported by Lebbeous Fogle-Weekley on 2011-09-30
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
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::Utils::Logger.

Making these scripts do all feasible logging with OpenSRF::Utils::Logger could greatly aid users in troubleshooting.

For bonus points, enhance the logging to tell us even more about what's going on in those scripts.

I have looked at
(http://docs.evergreen-ils.org/1.6/draft/html/writing_an_opensrf_service.html
under Error! Warning! Info! Debug!) and
(http://evergreen-ils.org/dokuwiki/doku.php?id=opensrf:1.2:install)
and thought of using the logger in OpenSRF::Utils::Logger in
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(),
$logger->internal(), $logger->debug() according to the information in
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.

Michael Peters (mrpeters) wrote :

Lasindu,

Thank you for your efforts in attempting to resolve this bug. Unfortunately, the Evergreen community requires that all code submissions follow the guidelines at http://evergreen-ils.org/dokuwiki/doku.php?id=contributing#submitting_code_to_the_project. Most of all, submissions via Git are preferred. At the very minimum, a Git formatted patch is required.

Some great information on getting started with that is available at http://evergreen-ils.org/dokuwiki/doku.php?id=dev:git

As for commit messages, at a minimum, the commit message should consist of a subject line (i.e., the first line of the commit message), then a blank line, then an optional description of the patch, followed by one or more signoffs. The subject line should be brief, ideally no more than 60-70 characters, and should include a bug number from LaunchPad if relevant. Here is an example of a minimum commit message:

LP#24544: fix the quuxifier
Signed-off-by: Jane Hacker <email address hidden>

If you need any help getting started with submitting code this way in the future, please feel free to reach out to me (or any of the other devs) via email, or the Evergreen IRC chat. (#evergreen on Freenode.net).

Thank you, again, for your efforts and I hope you're able to get the code formatted in the proper manner.

Changed in evergreen:
status: New → Incomplete
Changed in evergreen:
status: Incomplete → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments