# # - Log::Log4perl - # This spec file was automatically generated by cpan2rpm [ver: 2.028] # The following arguments were used: # --keep-pipes Log::Log4perl 2>&1 # For more information on cpan2rpm please visit: http://perl.arix.com/ # %define pkgname Log-Log4perl %define filelist %{pkgname}-%{version}-filelist %define NVR %{pkgname}-%{version}-%{release} %define maketest 1 name: perl-Log-Log4perl summary: Log-Log4perl - Log4j implementation for Perl version: 1.25 release: 1 vendor: Mike Schilli packager: Arix International license: Artistic group: Applications/CPAN url: http://www.cpan.org buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n) buildarch: noarch prefix: %(echo %{_prefix}) source: http://search.cpan.org//CPAN/authors/id/M/MS/MSCHILLI/Log-Log4perl-1.25.tar.gz %description Log::Log4perl lets you remote-control and fine-tune the logging behaviour of your system from the outside. It implements the widely popular (Java-based) Log4j logging package in pure Perl. For a detailed tutorial on Log::Log4perl usage, please read http://www.perl.com/pub/a/2002/09/11/log4perl.html Logging beats a debugger if you want to know what's going on in your code during runtime. However, traditional logging packages are too static and generate a flood of log messages in your log files that won't help you. `Log::Log4perl' is different. It allows you to control the number of logging messages generated at three different levels: =over 4 =item * At a central location in your system (either in a configuration file or in the startup code) you specify *which components* (classes, functions) of your system should generate logs. =item * You specify how detailed the logging of these components should be by specifying logging *levels*. =item * You also specify which so-called *appenders* you want to feed your log messages to ("Print it to the screen and also append it to /tmp/my.log") and which format ("Write the date first, then the file name and line number, and then the log message") they should be in. =back This is a very powerful and flexible mechanism. You can turn on and off your logs at any time, specify the level of detail and make that dependent on the subsystem that's currently executed. Let me give you an example: You might find out that your system has a problem in the `MySystem::Helpers::ScanDir' component. Turning on detailed debugging logs all over the system would generate a flood of useless log messages and bog your system down beyond recognition. With `Log::Log4perl', however, you can tell the system: "Continue to log only severe errors to the log file. Open a second log file, turn on full debug logs in the `MySystem::Helpers::ScanDir' component and dump all messages originating from there into the new log file". And all this is possible by just changing the parameters in a configuration file, which your system can re-read even while it's running! # # This package was generated automatically with the cpan2rpm # utility. To get this software or for more information # please visit: http://perl.arix.com/ # %prep %setup -q -n %{pkgname}-%{version} chmod -R u+w %{_builddir}/%{pkgname}-%{version} %build grep -rsl '^#!.*perl' . | grep -v '.bak$' |xargs --no-run-if-empty \ %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' CFLAGS="$RPM_OPT_FLAGS" %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '` %{__make} %if %maketest %{__make} test %endif %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '` cmd=/usr/share/spec-helper/compress_files [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress [ -x $cmd ] && $cmd # SuSE Linux if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ] then %{__mkdir_p} %{buildroot}/var/adm/perl-modules %{__cat} `find %{buildroot} -name "perllocal.pod"` \ | %{__sed} -e s+%{buildroot}++g \ > %{buildroot}/var/adm/perl-modules/%{name} fi # remove special files find %{buildroot} -name "perllocal.pod" \ -o -name ".packlist" \ -o -name "*.bs" \ |xargs -i rm -f {} # no empty directories find %{buildroot}%{_prefix} \ -type d -depth \ -exec rmdir {} \; 2>/dev/null %{__perl} -MFile::Find -le ' find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}"); print "%doc eg xml ldap Changes README LICENSE"; for my $x (sort @dirs, @files) { push @ret, $x unless indirs($x); } print join "\n", sort @ret; sub wanted { return if /auto$/; local $_ = $File::Find::name; my $f = $_; s|^\Q%{buildroot}\E||; return unless length; return $files[@files] = $_ if -f $f; $d = $_; /\Q$d\E/ && return for reverse sort @INC; $d =~ /\Q$_\E/ && return for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|; $dirs[@dirs] = $_; } sub indirs { my $x = shift; $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs; } ' > %filelist [ -z %filelist ] && { echo "ERROR: empty %files listing" exit -1 } %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files -f %filelist %defattr(-,root,root) %changelog * Tue Nov 1 2011 rpm@janus.arix.com - Initial build.