SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Log-Logger rpm build for : OpenSuSE. For other distributions click perl-Log-Logger.

Name : perl-Log-Logger
Version : 1.01 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : lp155.6.1 Date : 2023-07-20 18:15:36
Group : Development/Libraries/Perl Source RPM : perl-Log-Logger-1.01-lp155.6.1.src.rpm
Size : 0.01 MB
Packager : https://www_suse_com/
Summary : OO interface to user defined logfile
Description :
Whenever writing scripts for system management, I always find myself
wishing to keep a log of what I have done. But typing

print LOGHANDLE $progname . \": \" . $stringToLog . \"\
\";

every time gets really old. Similarly, \'die()\' does not have the facility
to print to a logfile as it exits.

A long time ago, I wrote two functions, \'log()\' and \'fail()\', to handle
this problem. I cut and pasted them everywhere. But now that Perl does
modules for object reuse, I have ported them to a module and added
features.

\'Log::Logger\' is esentially a wrapper around an \'IO::File\' object. The
\'open\' and \'open_append\' functions just call \'IO::File->open()\' with the
appropriate arguments. The useful functionality is in the \'log()\',
\'log_print()\', and \'fail()\' methods. These methods make logging what you
are doing -- and printing to the user, if you like -- one line of code. eg:


print STDOUT \"$progName: Running /var/clean script...\
\";
print LOGHANDLE \"$progName: Running /var/clean script...\
\";


$lh->log_print(\"Running /var/clean script...\");

And if you wish to log things, but also keep neat die() expressions, you
can. eg:


system(\"foo\") == 0 or die \"Call to foo failed\"


system(\"foo\") == 0 or do {
print LOGHANDLE, \"Call to foo failed\";
die \"Call to foo failed\";
}


system(\"foo\") == 0 or $lh->fail(\"Call to foo failed\");

Obviously, this is not a huge difference, but in a utility where you keep
track of a lot of operations, it just is easier, and saves a little bit of
typing. Remember, one of the fundamental qualities of a programmer is
Laziness (see the Camel book).

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-L/15.5/noarch

Content of RPM  Provides Requires

Download
ftp.icm.edu.pl  perl-Log-Logger-1.01-lp155.6.1.noarch.rpm
     

Provides :
perl(Log::Logger)
perl-Log-Logger

Requires :
perl(:MODULE_COMPAT_5.26.1)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.26.1/Log
/usr/lib/perl5/vendor_perl/5.26.1/Log/Logger.pm
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
/usr/share/doc/packages/perl-Log-Logger
/usr/share/doc/packages/perl-Log-Logger/README
/usr/share/man/man3/Log::Logger.3pm.gz

 
ICM