From: Paul G. <pa...@ge...> - 2007-08-01 07:36:09
|
Jamie Cameron wrote: > On 31/Jul/2007 14:12 Paul Gear wrote .. >> Hi folks, >> >> I've made a few useful (i think) changes to the Shorewall module, and i >> plan to make a few more before i send in the patches. However, i would >> like to do some more testing & debugging, and i'd like to know what sort >> of debugging tools are at my disposal. >> >> From what i can tell, the Perl errors from my module actually go nowhere >> at all. Is this correct/intended? What is the preferred mechanism to >> capture Perl errors and produce debug output? I've experimented with >> saving temporary files using a technique i borrowed from another module, >> and that seems to work sometimes, but not always (and possibly is >> dependent upon the actual path used). I'm confused! :-( > > Hi Paul, > The debugging technique I usually use is to print to STDERR, which is > then logged to /var/webmin/miniserv.error . Not exactly the most modern > technique in this age of source-level debuggers, breakpoints and variable > watching, but it works for me :-) Works for me - but i'm a bit old-school, too. ;-) Here's a first cut patch at what i've done with Shorewall. (Important points are in the changelog.) I've done some basic testing of the changes, but i'm sure it could use more. I wasn't sure about a lot of the webmin idioms for things, so i tried to preserve the coding style (except for the zero-indent technique!) as much as i could. Hope it works for everyone. I'd appreciate any feedback. -- Paul <http://paulgear.webhop.net> -- Be nice to apostrophes! http://www.apostrophe.fsnet.co.uk/ |