# # spec file for package perl-Log-Any-App # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name Log-Any-App Name: perl-Log-Any-App Version: 0.540.0 Release: 0 # 0.540 -> normalize -> 0.540.0 %define cpan_version 0.540 License: Artistic-1.0 OR GPL-1.0-or-later Summary: An easy way to use Log::Any in applications URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/P/PE/PERLANCAR/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Data::Dump) BuildRequires: perl(File::HomeDir) BuildRequires: perl(File::Path) >= 2.07 BuildRequires: perl(File::Slurper) BuildRequires: perl(File::Write::Rotate) >= 0.290 BuildRequires: perl(IO::Socket::UNIX::Util) BuildRequires: perl(JSON::MaybeXS) BuildRequires: perl(Log::Any::Adapter) >= 0.07 BuildRequires: perl(Log::Any::Adapter::Log4perl) >= 0.60.0 BuildRequires: perl(Log::Any::IfLOG) >= 0.70.0 BuildRequires: perl(Log::Dispatch::ArrayWithLimits) BuildRequires: perl(Log::Dispatch::Dir) >= 0.100 BuildRequires: perl(Log::Dispatch::FileWriteRotate) >= 0.40.0 BuildRequires: perl(Log::Dispatch::Syslog) >= 2.29 BuildRequires: perl(Log::Log4perl) >= 1.36 Requires: perl(Data::Dump) Requires: perl(File::HomeDir) Requires: perl(File::Path) >= 2.07 Requires: perl(File::Write::Rotate) >= 0.290 Requires: perl(IO::Socket::UNIX::Util) Requires: perl(JSON::MaybeXS) Requires: perl(Log::Any::Adapter) >= 0.07 Requires: perl(Log::Any::Adapter::Log4perl) >= 0.60.0 Requires: perl(Log::Any::IfLOG) >= 0.70.0 Requires: perl(Log::Dispatch::ArrayWithLimits) Requires: perl(Log::Dispatch::Dir) >= 0.100 Requires: perl(Log::Dispatch::FileWriteRotate) >= 0.40.0 Requires: perl(Log::Dispatch::Syslog) >= 2.29 Requires: perl(Log::Log4perl) >= 1.36 Provides: perl(Log::Any::App) = %{version} %undefine __perllib_provides %{perl_requires} %description IMPORTANT: Please read "ROAD TO 1.0" on some incompatibilities in the near future, before 1.0 is released. Log::Any::App is a convenient combo for Log::Any and Log::Log4perl (although alternative backends beside Log4perl might be considered in the future). To use Log::Any::App you need to be sold on the idea of Log::Any first, so please do a read up on that first. The goal of Log::Any::App is to provide developers an easy and concise way to add logging to their _*applications*_. That is, instead of modules; modules remain using Log::Any to produce logs. Applications can upgrade to full Log4perl later when necessary, although in my experience, they usually don't. With Log::Any::App, you can replace this code in your application: use Log::Any '$log'; use Log::Any::Adapter; use Log::Log4perl; my $log4perl_config = ' some long multiline config...'; Log::Log4perl->init(\$log4perl_config); Log::Any::Adapter->set('Log4perl'); with just this: use Log::Any::App '$log'; # plus some other options when necessary Most of the time you don't need to configure anything as Log::Any::App will construct the most appropriate default Log4perl configuration for your application. %prep %autosetup -n %{cpan_name}-%{cpan_version} %build perl Makefile.PL INSTALLDIRS=vendor %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes Changes.OLD README %license LICENSE %changelog