# # spec file for package log4cplus # # Copyright (c) 2025 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 soname 2_1-9 Name: log4cplus Version: 2.1.2 Release: 1.1 Summary: C++ logging library License: Apache-2.0 Group: Development/Libraries/C and C++ URL: http://log4cplus.sourceforge.net/ Source: https://downloads.sourceforge.net/project/log4cplus/log4cplus-stable/%{version}/%{name}-%{version}.tar.xz Source2: https://downloads.sourceforge.net/project/log4cplus/log4cplus-stable/%{version}/%{name}-%{version}.tar.xz.sig Source3: %{name}.keyring BuildRequires: gcc-c++ BuildRequires: pkgconfig BuildRequires: xz %description log4cplus is a simple to use C++ logging API providing thread-safe, flexible, and arbitrarily granular control over log management and configuration. It is modeled after the Java log4j API. %package -n lib%{name}-%{soname} Summary: C++ logging library Group: System/Libraries Provides: %{name} = %{version} Conflicts: liblog4cplus-1_2-5 %description -n lib%{name}-%{soname} log4cplus is a simple to use C++ logging API providing thread-safe, flexible, and arbitrarily granular control over log management and configuration. It is modeled after the Java log4j API. %package devel Summary: Development files for %{name} Group: Development/Libraries/C and C++ Requires: lib%{name}-%{soname} = %{version}-%{release} %description devel This package provides development libraries and headers needed to build software making use of %{name} %prep %autosetup %build %configure --disable-static %make_build %check %make_build check %install %make_install find %{buildroot} -type f -name "*.la" -delete -print %post -n lib%{name}-%{soname} -p /sbin/ldconfig %postun -n lib%{name}-%{soname} -p /sbin/ldconfig %files -n lib%{name}-%{soname} %license COPYING %{_libdir}/lib*.so.* %files devel %license COPYING %{_includedir}/log4cplus/ %{_libdir}/lib*.so %{_libdir}/pkgconfig/log4cplus.pc %changelog * Sun Mar 30 2025 Dirk Müller - update to 2.1.2: * Implement `LOG4CPLUS_ASSERT_FMT()` - formats assertion message using C-style format string. * Implement `LOG4CPLUS_ASSERT_FORMAT()` - formats assertion message using C++20 `` header facilities. * `log4cplus.threadPoolBlockOnFull`. When this property is `true` (default), threads will block when internal thread pool queue is full. * Thu Aug 22 2024 Jorik Cronenberg - Update to 2.1.1: * Add missing source files to MSVC project files. * Resolve environment variables in include directive in configuration file. * Throw exception on nonexistent properties file, if requested by fThrow flag. * Generate pkgconfig file with CMake. * Add locale support to ConsoleAppender. * Initialize thread pool for async logging on demand. * SysLogAppender: Allow non-FQDN hostname in syslog messages. * Update Catch2 to v2.13.9. - Run tests at buildtime - Add source validation and update keyring * Thu Jul 28 2022 Dirk Müller - update to 2.0.8: * Add CMake alias libraries. * Add an option to disable tests to configure script. * Fix C++11 compatibility: C++11 does not have basic_string_view. * Look for Android's log library. * Fix handling of ,aux extension for FileAppender. * Wed Apr 27 2022 Jan Engelhardt - Resolve rpmlint report "liblog4cplus-1_2-5.x86_64: E: shlib-policy-name-error SONAME: liblog4cplus-2.0.so.3, expected package suffix: 2_0-3" * Mon Jan 31 2022 Dirk Müller - update to 2.0.7: * Fix compilation with C++20 compiler, use std::invoke_result. * TimeBasedRollingFileAppender: Clear files before `MaxHistory` when `CleanHistoryOnStart=false`. * Update embedded Catch2 to version v2.13.7 to compilation with current Glibc. GitHub issue #519. * Sat May 8 2021 Dirk Müller - update to 2.0.6: * Fixes to internal thread pool. * Internal thread pool can now be disabled during compilation. Use - -disable-thread-pool with Autotools based build or set LOG4CPLUS_ENABLE_THREAD_POOL to OFF with CMake based build. * Improved SONAME handling in CMake. * Update Catch to 2.13.4 to fix compilation on MacOS X on AArch64. * Mon Oct 5 2020 Dirk Mueller - update to 2.0.5: * long list of improvements and bugfixes, see https://github.com/log4cplus/log4cplus/releases * Tue Mar 20 2018 astieger@suse.com - update to 1.2.1 (bsc#1085912): * many improvements and bug fixes * verify source signature * Mon Mar 4 2013 jengelh@inai.de - Kill off %%make_install to unbreak SLE build * Fri Oct 5 2012 toddrme2178@gmail.com - Update to 1.1.0 - Fixed MacOS X support - Reimplemented semaphores using named ones for Apple builds - Fixed resource leak on failure in openSocket() - Improved configuration file modification check to include file size, in addition to file modification time - Fixed non-STLPort4 builds with Solaris Studio. Switch '-library=stlport4' is only added if CXXFLAGS does not already contain a switch matching -library=(stlport4|stdcxx4|Cstd) - Fixed --disable-shared MinGW builds - Fixed non-working MinGW DLL binaries. DllMain() was not being called because of missing extern "C" in its definition - CMake build configuration checks have been improved - GCC switch -O2 is only added if CXXFLAGS does not already contain any other -O - Improved logging speed using SysLogAppender and Log4jUdpAppender by optimizations in both the loggers and in common sockets code - FileAppender locale can now be specified in properties files using Locale property. See FileAppender Doxygen documentation for more details - Improved Log4jUdpAppender compatibility with Chainsaw - Fixed crash, bugs #3467112 and #3563699, related to thread-local storage destruction - Fixed build with Visual Studio 2005, bug #3565529 - Created Cygwin port's .cygport definition for log4cplus - Improved hiding of private symbols using GCC's __attribute__((visibility("hidden"))) and Solaris Studio's __hidden - Fixed build in environments where DEBUG (and other log level names) are macros. - Improved configuration of threads support - Turned on __thread (TLS) detection on NetBSD 5.1.0 and later that has been previously disabled - Improved compatibility with log4cplus 1.0.x: allow using log4cplus 1.0.x log level to string callbacks in 1.1.x - Improved various M4 macros - Added detection and use C++11 thread_local - Fixed XML entities escaping in Log4jUdpAppender - Re-added synchronization between ConsoleAppender and LogLog - Changed C logger API to return int instead of bool - Added C logger API to Visual Studio 2010 projects - Implemented remote syslog logging using UDP in SysLogAppender - Enabled SysLogAppender on Windows with only remote syslog logging enabled - IMPORTANT: Builds with --with-iconv configure switch now assume UTF-8 for plain char strings - Bumped up SO version for UDP sockets support related changes - Removed Windows CE support - Regenerated with Automake 1.12.2 - Fixed Fedora RPM builds spec file - Implemented log4cplus.disableOverride similar to log4j's log4j.disableOverride - Improved support of profiling and debugging builds with Sun CC - Added documentation for configure script options - Added detection and use of clock_nanosleep() - Disabled __thread (TLS) detection for NetBSD. It is broken there - New appender: Log4jUdpAppender. It allows logging using UDP with log4j XML payload to Chainsaw or Log2Console - Added support for __func__ as function name source for logging events - Fixed compilation for build with wchar_t being alias to unsigned short (/Zc:wchar_t-) (Windows) - Added new appender CLFSAppender (experimental), based on Microsoft Common Log File System API - Added new appender Qt4DebugAppender (experimenta), based on Qt4's qDebug(), qWarning() and qCritical() functions - Fixed bug #3530769 - compilation issues with Visual Studio 2011 - Added log4cplus.quietMode property handling to PropertyConfigurator - Added #pragma once to all headers - Implemented Time::gettimeofday() using Win32 API's GetSystemTimeAsFileTime() - Moved file based locking from FileAppender to Appender to make it available for all appenders - Changed Windows configuration to use __declspec(thread) when compiling for Windows Vista or later and TlsAlloc() otherwise - Implemented %%r PatternLayout format specifier - miliseconds since process start - Fixed bug #3101459 - TTCCLayout time is not in milliseconds since process start by default - Fixed single threaded log4cplus build issues - Added ability to log to std::cerr - Fixed disabling of LOG4CPLUS_*_FMT() macros - IMPORTANT: Compilation with Solaris Studio now depends on STLPort (-library=stlport4 switch). The default Cstd library is not conforming enough for use in log4cplus - Improved behaviour of log4cplus as a component of larger CMake based project - Updated various Autoconf detection scripts in m4/ directory to newer versions - Fixed some signedness and overflow warnings - Improved Autotools build system's behaviour for cross compilation - Added detection of C++11 header and related functions. Implemented SharedObject reference counting using C++11 atomics where possible - Fixed compilation with GCC 4.6 in C++11 mode - Fixed some single-threaded compilation and run time issues - Fixed bug #3520891 - FileAppender buffering issue - Updated to Autoconf 2.69, Automake 1.12 and Libtool 2.4.2 - Documented build procedure for Solaris Studio - Improved support for Solaris Studio in configure.in - Fixed log4cplusS.vcxproj - Added missing source files to the project - CMake build system fixes - Fixed TTCCLayout double time stamp issue - Important changes relative to PRODUCTION_1_0_x branch: - Added AsyncAppender - Added simple C interface for interoperability with C - Added inter-process file locking to file appenders to allow logging into a single log file from multiple processes - Added Mapped Diagnostic Context (MDC) and associated converter (%%X) - Added alternative thread identification (%%T) converter to pattern layout - Added function name converter (%%M) - Added wchar_t <-> char conversion implementations based on standard C locale functions and based on iconv() - Added DeviceAppender to allow use of Boost.IOStream's Sink as appender - Added LOG4CPLUS_*_FMT() macros to allow printf-like formatted output where it is possible - Logging macros now accept both logger name as string and Logger instance as their first parameter - Update sonum 1.1-5 * Wed Jun 6 2012 cfarrell@suse.com - license update: Apache-2.0 SPDX format * Fri Sep 23 2011 toddrme2178@gmail.com - Renamed to log4cplus to match upstream name - Update to 1.0.4 - bugfix release - Update to 1.0.3 - bugfix release - Update to 1.0.2 - bugfix release - Update to 1.0.1 - bugfix release - Cleaned up spec file formatting * Wed Jan 14 2009 bbrunner@suse.de - initial package