Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help creating custom warnings/error logs...

Status
Not open for further replies.

mlg4035

Technical User
Aug 18, 2002
27
JP
Hey guys and gals, a customer of mine has requested that I help his in-house programmer implement a custom error handling system for one of his CGI scripts. I'm really struggling to find a good, easy solution that will satisfy his requirements.

Basically he'd like all warnings, errors, fatals, etc. routed to a specific error log based upon:

A) the current day of the week(i.e. he'd like 7 logs, one for each day, that will be completely overwritten on the same day of the following week),

B) one of three levels of verbosity: 'warnings','errors', and 'debug'(i.e. he wants the in-house guy to be able to set the level of verbosity depending upon what level of error data he'd like to collect for that week.), and,

C) he'd like the errors formatted like this:
[2002/12/02 10:55:12]['warning', 'error', or 'debug']$error_msg[$file:$line_nm]

So far, I've been looking at using -

CGI::Carp (specifically the 'carpout' function to direct errors to a specified filehandle), and/or

warnings pragma(Perl Lexical Warnings) so I can pick and choose specific categories of warnings to capture for each of the three levels of error data, and/or

sigtrap pragma(to enable signal handling)...

However, in reading through the documentation for these I'm getting more and more confused about which one(s) to use, how to use them together, etc.

Can anyone recommend the best and, preferrably easiest, course of action on this? I'd really appreciate your collective expertise!

Thank you.
MLG4035


'Well, it's one louder, isn't it?...
What we do is, if we need that extra push over the cliff, you know what we do?...Eleven. Exactly. One louder.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top