Re: [webmin-devel] Debugging and Shorewall module

Paul Gear <[email protected]>
Newsgroups gmane.comp.web.webmin.devel
Message-ID <[email protected]>
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/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
webmin-shorewall.patch.bz2 (application/octet-stream, 5.5 KB) - not displayed
signature.asc (application/pgp-signature, 252 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGsDfQY1u5R057COQRAphoAJ0bCbT0uEBs2tYF+AMnQwKok8StowCdE+Ms
qGjp5hmMPsy86sTuFxDoEg8=
=NKqV
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.