Name : perl-CGI-Log
| |
Version : 1.00
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.7.1
| Date : 2023-07-20 16:22:42
|
Group : Development/Libraries/Perl
| Source RPM : perl-CGI-Log-1.00-lp155.7.1.src.rpm
|
Size : 0.02 MB
| |
Packager : https://www_suse_com/
| |
Summary : Perl extension for centralized logging of debug, error, status and succe[cut]
|
Description :
This module acts as a central repository for debug, status and error messages. It instantiates itself automatically (if it needs to) so you can access the Log object functions from anywhere in you code including other modules/objects with a simple consistent syntax.
It was written for CGI and mod_perl programming, but it could easily be used in any perl script where there is a need for centralized logging. (The only function which is CGI specific is print() since it outputs the debug and error logs with HTML formatting.)
It was originally written to just hold debugging information, but it has been extended to hold information that you might want to return to the user (i.e. the user-interface).
It is designed to be very painless to use. Add the following to any script or module where you want to log messages:
use CGI::Log;
The CGI::Log:: namespace has been aliased to Log:: in order to save a bit of typing when adding debugging messages. So, to add a debug message, enter:
Log->debug(\"Your message here.\");
To add an error message:
Log->error(\"Some information about the error goes here.\");
To add an success, or status message:
Log->status(\"A status or informational message for the user.\"); Log->success(\"Something worked properly.\");
The following commands all retrieve the messages you\'ve logged:
AATTmsg = Log->get_debug; AATTmsg = Log->get_error; AATTmsg = Log->get_error(\"UI\"); AATTmsg = Log->get_status; AATTmsg = Log->get_success;
Note: All the get_* methods return array references when called in scalar context. e.g.
$msg = Log->get_success; ## ref($msg) eq \"ARRAY\"
During CGI/mod_perl development it is very handy to dump all of the debugging messages at the bottom of the HTML page. This is done with:
Log->print;
This can just be left at the bottom of your main script. Logging can be turned off (default is on), and when it is turned off Log->print() doesn\'t do anything.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-C/15.5/noarch |