mspieth / rssdler

Automatically exported from code.google.com/p/rssdler
4 stars 0 forks source link

Regex match logging enhancement #48

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am attaching the follow patches (one against the 0.4.2 release and the
other against 0.4.2 w/ the issue 47 patch applied) to allow better logging
of regex matches.  The enhancements introduced are as follows:

1. The checkRegExG{True,False} methods have one and only one exit from the
methods (multiple exits from a method make a program hard to follow and are
one of my pet peeves).
2. The same methods log what thread they're matching against and whether
they matched.
NOTE: Since the logic in these two methods is nearly identical, they really
should be made one method.  Since I can't (as of now) come up with a
refactoring of the two methods into one in order to match the functionality
of the two separate methods to match what I think it should be, I'm merely
inserting the log calls for right now.
3. Tweaked the DownloadItemConfig data structure to carry the download line
it comes from.  Also tweaked the checkRegEx method to output the thread and
download config number a match or non-match is made against.

If there are any questions or comments about these patches, you can contact
me at my gmail address or (preferably) dasnyderx at yahoo dot com.

Cheers,
David A. Snyder

Original issue reported on code.google.com by dasnyd...@gmail.com on 6 Dec 2009 at 11:38

Attachments: