Apache Log4cxx
Version 1.3.1
|
Option | Usage |
---|---|
LOG4CXX_WCHAR_T=no | Enable wchar_t API methods, choice of yes (default), no. |
LOG4CXX_UNICHAR=yes | Enable UniChar API methods, choice of yes, no (default). |
LOG4CXX_CFSTRING=yes | Enable CFString API methods, requires Mac OS/X CoreFoundation, choice of yes, no (default). |
BUILD_TESTING=off | Do not build tests. Tests are built by default |
BUILD_FUZZERS | Enabled by default if BUILD_TESTING=ON and libFuzzer is found. |
BUILD_SITE=OFF | Set to ON to enable the project website build. Requires Doxygen. |
BUILD_SHARED_LIBS=off | Build Log4cxx as a static library. A dynamically linked Log4cxx library is built by default. Any compilation unit that includes a Log4cxx header must define LOG4CXX_STATIC. |
APU_STATIC=yes | Link to the APR-Util static library. By default, the Log4cxx shared library is linked to the APR-Util shared library. If BUILD_SHARED_LIBS=off, the static APR-Util library is used. |
APR_STATIC=yes | Link to the APR static library. By default, the Log4cxx shared library is linked to the APR shared library. If BUILD_SHARED_LIBS=off, the static APR library is always used. |
LOG4CXX_TEST_PROGRAM_PATH=path | An extra path to prepend to the PATH for test programs. Log4cxx requires zip, sed, and grep on the PATH in order for the tests to work properly. |
PREFER_BOOST=on | Prefer the Boost version of dependent libraries over standard library |
LOG4CXX_QT_SUPPORT=ON | Enable QString API and log4cxx::qt namespace methods, requires QtCore, choice of ON, OFF (default). |
LOG4CXX_EVENTS_AT_EXIT=ON | Prevent static data cleanup to allow event logging during application exit. |
LOG4CXX_FORMAT_NAMESPACE=std | Make the LOG4CXX_[level]_FMT macros use std::format by default. |
Make sure cmake (3.13+), g++, gzip, zip and make are available. On a Debian system these may be installed by:
The easiest way to get dependencies installed is to use vcpkg.
Use these commands to build and install Log4cxx.
To link to Log4cxx to your application, add "-DCMAKE_TOOLCHAIN_FILE=%HOMEPATH%/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake" to your cmake command line arguments.
Build from source in %HOMEPATH%/Libraries.
Use your browser to download Windows source:
Extract the source code into directories in %HOMEPATH%/Libraries named:
Use these commands to build and install dependencies.
Use these commands to build and install Log4cxx.
Build and run unit tests in %HOMEPATH%/Libraries. The location of command-line utilities must be provided to the Log4cxx cmake build in the LOG4CXX_TEST_PROGRAM_PATH cmake variable. Command-line utilities (zip, grep, sed) are available in Msys2 which can be downloaded from: https://www.msys2.org/ and by default will be installed under C:/msys64/usr/bin.
Build and install dependencies using the above commands, then use these commands to build Log4cxx and run Log4cxx unit tests.
APR and APR-Util are provided by the platform in Mac OS/X 10.5 and iODBC in 10.4.
cmake can be installed by typing "brew install cmake".
CMake can be built from source by typing:
APR, APR-Util, gzip and zip may be installed from the ports collection by: