log4cplus/2.1.1

simple to use C++ logging API, modelled after the Java log4j API
Recipe info
BSD-2-Clause, Apache-2.0
2023-12-26

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
log4cplus/2.1.1

Using log4cplus

Note

If you are new with Conan, we recommend to read the section how to consume packages.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
log4cplus/2.1.1
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("log4cplus/2.1.1")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): log4cplus
  • CMake target name(s): log4cplus::log4cplus
  • pkg-config file name(s): log4cplus.pc

A simple use case using the CMake file name and the global target:

# ...
find_package(log4cplus REQUIRED)
# ...
target_link_libraries(YOUR_TARGET log4cplus::log4cplus)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the log4cplus homepage listed above:

#include "log4cplus/appender.h"
#include "log4cplus/asyncappender.h"
#include "log4cplus/boost/deviceappender.hxx"
#include "log4cplus/callbackappender.h"
#include "log4cplus/clogger.h"
#include "log4cplus/config.hxx"
#include "log4cplus/config/defines.hxx"
#include "log4cplus/config/macosx.h"
#include "log4cplus/config/win32.h"
#include "log4cplus/config/windowsh-inc.h"
#include "log4cplus/configurator.h"
#include "log4cplus/consoleappender.h"
#include "log4cplus/exception.h"
#include "log4cplus/fileappender.h"
#include "log4cplus/fstreams.h"
#include "log4cplus/helpers/appenderattachableimpl.h"
#include "log4cplus/helpers/connectorthread.h"
#include "log4cplus/helpers/fileinfo.h"
#include "log4cplus/helpers/lockfile.h"
#include "log4cplus/helpers/loglog.h"
#include "log4cplus/helpers/pointer.h"
#include "log4cplus/helpers/property.h"
#include "log4cplus/helpers/queue.h"
#include "log4cplus/helpers/snprintf.h"
#include "log4cplus/helpers/socket.h"
#include "log4cplus/helpers/socketbuffer.h"
#include "log4cplus/helpers/stringhelper.h"
#include "log4cplus/helpers/thread-config.h"
#include "log4cplus/helpers/timehelper.h"
#include "log4cplus/hierarchy.h"
#include "log4cplus/hierarchylocker.h"
#include "log4cplus/initializer.h"
#include "log4cplus/internal/env.h"
#include "log4cplus/internal/internal.h"
#include "log4cplus/internal/socket.h"
#include "log4cplus/layout.h"
#include "log4cplus/log4cplus.h"
#include "log4cplus/log4judpappender.h"
#include "log4cplus/logger.h"
#include "log4cplus/loggingmacros.h"
#include "log4cplus/loglevel.h"
#include "log4cplus/mdc.h"
#include "log4cplus/ndc.h"
#include "log4cplus/nteventlogappender.h"
#include "log4cplus/nullappender.h"
#include "log4cplus/socketappender.h"
#include "log4cplus/spi/appenderattachable.h"
#include "log4cplus/spi/factory.h"
#include "log4cplus/spi/filter.h"
#include "log4cplus/spi/loggerfactory.h"
#include "log4cplus/spi/loggerimpl.h"
#include "log4cplus/spi/loggingevent.h"
#include "log4cplus/spi/objectregistry.h"
#include "log4cplus/spi/rootlogger.h"
#include "log4cplus/streams.h"
#include "log4cplus/syslogappender.h"
#include "log4cplus/tchar.h"
#include "log4cplus/thread/impl/syncprims-cxx11.h"
#include "log4cplus/thread/impl/syncprims-impl.h"
#include "log4cplus/thread/impl/syncprims-pmsm.h"
#include "log4cplus/thread/impl/threads-impl.h"
#include "log4cplus/thread/impl/tls.h"
#include "log4cplus/thread/syncprims-pub-impl.h"
#include "log4cplus/thread/syncprims.h"
#include "log4cplus/thread/threads.h"
#include "log4cplus/tracelogger.h"
#include "log4cplus/tstring.h"
#include "log4cplus/version.h"
#include "log4cplus/win32consoleappender.h"
#include "log4cplus/win32debugappender.h"