# log4cplus/log4cplus

log4cplus is a simple to use C++ logging API providing thread-safe, flexible, and arbitrarily granular control over log management and configuration. It is modelled after the Java log4j API.

Repository: https://github.com/log4cplus/log4cplus
Canonical: https://ross.abutalabs.com/products/log4cplus
Homepage: https://log4cplus.github.io/log4cplus/
Language: C++
License: NOASSERTION
License Family: other
Topics: log4cplus, cxx, logging, logging-library
Last push: 2026-07-11T18:24:42+00:00

## Health v2 (maintenance only)
Score: 82/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 92, release rhythm 60, longevity 100
- inputs: {"age_days": 4617, "days_push": 53, "days_rel": 57, "gap_med": 621, "n_releases_24m": 2}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1728, forks 567 (observed 2026-08-28T04:05:28.354389+00:00)

## What it is
log4cplus is a C++ logging library modeled after Java's log4j API, offering thread-safe, flexible, and granular log management and configuration. It avoids heavy dependencies and supports a wide range of platforms including Linux, macOS, Windows, BSD, Android, and iOS.

## Use cases
- add structured logging to a C++ application
- configure log levels and appenders at runtime
- replace printf debugging with a log4j-style logger
- log from multithreaded C++ code safely
- build a C++ library for Android or iOS with logging support

## When to choose
- you want a mature log4j-like logging API in C++
- you need thread-safe logging with granular configuration
- you want minimal dependencies in a C++ project
- you target multiple platforms including mobile and BSD

## When to avoid
- you need async structured logging for high-throughput services where spdlog may fit better
- your toolchain does not support C++23 required by 3.x releases
- you need logging integrated with a specific observability backend out of the box

## Facets
- artifact type: library
- maturity: active
- function: logging
- domain: developer-tools, backend
- platform: windows, bsd, cross-platform, cpp
- tags: log4j-style, thread-safe, hierarchical-loggers, configuration, linux, macos, android, ios

## Member repositories
- log4cplus/log4cplus (main) score 82

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:28.354389+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:32:10.160813+00:00, confidence not recorded.
  - readme: https://github.com/log4cplus/log4cplus (fetched 2026-08-28T04:05:28.354389+00:00, sha 46e18d44cb2e)
  - homepage: https://log4cplus.github.io/log4cplus/ (fetched 2026-08-29T11:08:50.765660+00:00, sha e06adf95bbe4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
