# Unreleased (2.2.1)

  - **IMPORTANT**: CMake builds now require CMake 3.20 or later. The
    implementation language remains C++11. GitHub PR #698.

  - **IMPORTANT**: iOS builds now use CMake's native platform support. The
    legacy custom iOS toolchain, `IOS_PLATFORM`/`CMAKE_IOS_*` variables, and
    ARMv7/i386 build scripts have been removed. The obsolete Android
    `LIBRARY_OUTPUT_PATH_ROOT` toolchain integration has also been removed.
    GitHub PR #698.

  - Prevent `DailyRollingFileAppender` process-exit rollover from accessing a
    destroyed directory separator string when `RollOnClose` is enabled. Keep
    the separator valid throughout shutdown by using a constant character.
    GitHub issue #272. GitHub PR #711.

  - Fix `TimeBasedRollingFileAppender` archive cleanup when consecutive
    cleanups cross a partial rollover period, so expired archives are not
    skipped during sparse logging. GitHub issue #634. GitHub PR #687,
    backported in #690. (fhgffy)

  - Fix `TimeBasedRollingFileAppender` rollover when `File` is omitted or
    empty. Keep completed dated files and append to the next `FilenamePattern`
    destination, preserving existing messages during repeated rollover and
    `RollOnClose`. Initial opening still honors `Append`. GitHub issue #668.
    GitHub PR #697.

  - Honor `CreateDirs` for dated archive directories in
    `TimeBasedRollingFileAppender` with a fixed `File`. On rename failure,
    preserve the active log and retry the original archive destination on the
    next eligible event instead of truncating the log. Report rename errors
    through the appender's error handler. GitHub issue #644. GitHub PR #708.

  - Fix `TimeBasedRollingFileAppender` period recovery across sequential
    process restarts. Use the modification time of a nonempty fixed `File`
    opened with `Append=true` to select its archive period, and roll over an
    expired period before writing the first eligible new event. Retain that
    period through stream reopens and failed rollover retries. GitHub issue
    #588. GitHub PR #710.

  - Fix accounting for asynchronous events dropped when the nonblocking thread
    pool queue is full. Appender shutdown and destruction can now finish after
    accepted events drain when `log4cplus.threadPoolBlockOnFull=false`. GitHub
    PR #694.

  - Fix asynchronous event accounting when an accepted nonblocking task
    finishes with an exception before its result is polled. Decrement the
    pending count only once, preventing unsigned underflow and shutdown hangs
    after queued work has drained. GitHub PR #716.

  - Fix `AsyncAppender::close()` to join its queue worker even after the
    worker stops running, so `close()` waits for thread-local cleanup after
    worker failure. Preserve queue draining and the synchronous logging
    fallback. GitHub PR #705.

  - Update the internal ThreadPool to recover safely from worker creation and
    pool growth failures, create one worker when a zero size is requested,
    reclaim retired workers, and wait for complete worker exit during
    shutdown. GitHub issue #646. GitHub PR #701 and ThreadPool PR
    log4cplus/ThreadPool#3.

  - Fix Windows DLL cleanup hangs and crashes during process termination
    through `exit()` or `ExitProcess()`. Skip resource cleanup once Windows
    has started terminating threads. Pending logging may be lost during
    process termination; orderly shutdown still drains accepted events. GitHub
    issue #408. GitHub PR #703.

  - Keep fractional timestamp padding for `%q` and `%Q` valid during startup
    and shutdown by replacing global strings with constant literal tables.
    Preserve the existing formatted output. GitHub issue #273. GitHub PR #714.

  - Fix installed CMake packages to discover `Threads` for static
    multithreaded libraries and provide `log4cplus::log4cplus` for static and
    Unicode builds with decorated library names. Add installed-package
    consumer regression coverage for shared/static and narrow/Unicode
    configurations. GitHub PR #690.

  - Generate CMake pkg-config metadata using the selected library name,
    including static/Unicode decoration and the Windows Debug postfix. Refresh
    the installed metadata when switching build configurations. GitHub PR
    #698.

  - Enable the internal thread pool in the handwritten MSBuild projects,
    restoring asynchronous logging support in both shared and static builds.
    GitHub PR #698.

  - Fix Windows archive-cleanup unit-test compilation and fixture creation.
    Remove an obsolete Win32 stream test source dependency from MinGW
    Autotools builds. GitHub PR #691 and #698.

  - Move Visual Studio 2019 and 2022 CMake/MSBuild CI builds to GitHub Actions
    with explicit `v142`/`v143` toolsets. Retain Visual Studio 2017 on
    AppVeyor and update its CMake installation to satisfy the new minimum
    version. GitHub PR #691 and #699.

  - Support native CMake device and Simulator builds for iOS 15 and later. iOS
    builds default to static libraries with tests and the logging server
    disabled, and disable interprocedural optimization so that installed
    archives can be packaged into an XCFramework. GitHub PR #698.

  - Add the Android-only `log4cplus::AndroidAppender`, which writes formatted
    events to Logcat through system `liblog`. Its `Tag` property defaults to
    `log4cplus`; tags and long message chunks preserve UTF-8 boundaries.
    Android production builds now link `liblog`, with static CMake consumers
    receiving the dependency without an absolute NDK path. GitHub PR #698.

  - Modernize Android build and installed-package validation using NDK r29,
    C++11, API level 21, and all four current NDK ABIs. The logging server now
    defaults to disabled on Android. GitHub PR #698.

  - Add iOS archive and XCFramework CI validation. Mobile CI checks
    compilation, linking, installation and packaging, without running device
    tests. GitHub PR #698.

  - Preserve the configured IPv6 setting when `SocketAppender` and
    `SysLogAppender` reconnect. Improve Apple socket portability by preventing
    `SIGPIPE` on socket writes and avoiding descriptor and size narrowing.
    GitHub PR #698.

# log4cplus 2.2.0.1

  This release has the same code and features as 2.2.0, with updated
  documentation for the Windows file appender changes.

# log4cplus 2.2.0

  **IMPORTANT**: Use a custom Win32-backed file stream for file-based appenders
  on Windows, allowing log files to be renamed while they are open by another
  process. File-based appenders on Windows now store log files as UTF-8,
  converting `wchar_t` log messages directly and narrow `char` log messages
  through the stream locale's Windows code page. This change is source
  compatible but ABI-changing.

  - Remove `LOG4CPLUS_ASSERT_FORMAT()`. It is not implemented in 2.x branch.

  - Fix compilation of Python bindings with Python 3.12+.

  - Fix Win32 lock file handling by matching `LockFileEx()` with
    `UnlockFileEx()` and preserving `GetLastError()` before cleanup.

  - Use `PRIVATE` linkage in CMake `target_link_libraries()` calls. GitHub
    issue #659.

  - Regenerate the Autotools build system with newer Automake and Libtool
    versions.

  - Remove unsupported macOS versions from the GitHub Actions build matrix.


# log4cplus 2.1.2

  **IMPORTANT**: Dropping Visual Studio 2015 compatibility. It is no longer
  able to compile the thread pool source.

  - Implement `LOG4CPLUS_ASSERT_FMT()` - formats assertion message using C-style
    format string.

  - ~~Implement `LOG4CPLUS_ASSERT_FORMAT()` - formats assertion message using
    C++20 `<format>` header facilities.~~

  - New configuration property: `log4cplus.threadPoolBlockOnFull`. When this
    property is `true` (default), threads will block when internal thread pool
    queue is full.

  - Warn about full internal thread pool queue when dropping events due to
    `log4cplus.threadPoolBlockOnFull` being `false`.


# log4cplus 2.1.1

  - Add missing source files to MSVC project files.

  - Resolve environment variables in `include` directive
    in configuration file. (Martin Engelmann)


# log4cplus 2.1.0

This release breaks ABI with 2.0.x. It is source compatible.

  - Throw exception on nonexistent properties file,
    if requested by `fThrow` flag.

  - Generate pkgconfig file with CMake.

  - Add locale support to ConsoleAppender. (Choy Kho Yee)

  - Initialize thread pool for async logging on demand.

  - SysLogAppender: Allow non-FQDN hostname
    in syslog messages.

  - Update Catch2 to v2.13.9.


# log4cplus 2.0.8

  - Add CMake alias libraries. GitHub issue #511.

  - Add an option to disable tests to `configure` script. (Fabrice Fontaine)

  - Fix C++11 compatibility: C++11 does not have `basic_string_view`.

  - Look for Android's `log` library. GitHub issue #543.

  - Fix handling of `,aux` extension for `FileAppender`. GitHub issue
    #534. (Pieter du Preez)

  - `filename` should not be empty for `TimeBasedRollingFileAppender`. GitHub
    issue #517. (Fox Chen)


# log4cplus 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.


# log4cplus 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.


# log4cplus 2.0.5

  - Modernized CMake build.

  - Update iOS support to build for current hardware architectures. (Patch by
    Pawel Maczewski)

  - Fix issue with `std::va_list` value reuse.

  - Fix parsing of `include` in configuration when included file path contains
    `=`. (Patch by Peter Pei)

  - Fix build issue #455. Source file `callbackappender.cxx` is missing from
    Visual Studio project for static library.

  - Fix issue #415. Wrong base source file name is provided if path on Windows
    contains `/`.

  - Change of default behaviour: Instantiate thread pool with only 4 threads.


# log4cplus 2.0.4

  - Fix Catch2 include path. GitHub issue #379.

  - Disable POSIX signals reception in thread before creating pool
    threads. GitHub issue #385 and follow up issue #390.

  - Fix compilation with NVCC in CUDA mode. GitHub issue #375.

  - Fix compilation with Visual Studio in C++17 mode. GitHub issue #401.

  - Allow disabling implicit initialization through `configure` script option
    `--disable-implicit-initialization`, or CMake build option
    `LOG4CPLUS_REQUIRE_EXPLICIT_INITIALIZATION`. (MaksymB)

  - Remove `android` directory with obsolete Android support. GitHub
    issue #283.

  - Link with `libatomic` when necessary. (Fabrice Fontaine)


# log4cplus 2.0.3

  - Fix compilation on systems without `O_CLOEXEC`. This affects, e.g.,
    Solaris 10. GitHub issue #326. (Patch by Jiangrz).

  - Provide `log4cplus::deinitialize()` to make the API symmetric
    (`log4cplus::initialize()` already exists) and to allow
    de-/initialization without `log4cplus::Initializer` instance. GitHub
    issue #340.

  - Deal with `register` keyword being generated in SWIG based bindings. The
    keyword is unused and reserved in C++17. Remove use of
    `std::unary_function`, it was removed in C++17.

  - Add ability to define new log levels using C API. Add reconfiguration
    API. (Jens Rehsack)

  - Add `NDCMatchFilter` and `MDCMatchFilter`. (Franck)


# log4cplus 2.0.2

  - Allow setting thread pool size using new function
    `setThreadPoolSize()`. Allow setting the size from `log4cplus.properties`
    using `log4cplus.threadPoolSize` property. Lower initial thread pool size
    by half to `std::thread::hardware_concurrency()` threads. GitHub issue
    #315.

  - Fix Autotools based build for MinGW. GitHub issue #317.

  - Add `configure` script option `--enable-lto` to allow easier LTO builds.

  - Optimization of `getFormattedTime()`. (Alexey Vishtak)

  - Introduction of `LOG4CPLUS_MACRO_FILE()` used in logging macros to allow
    users to redefine it and consequently hide source file names from their
    compiled executables and logging output.


# log4cplus 2.0.1

  - Update to Automake 1.16.1.

  - Adjust `spi::LoggerFactory` to allow custom `spi::LoggerImpl`. GitHub
    issue #309.

  - Fix MacOS X compilation. GitHub issue #312.


# log4cplus 2.0

  - CMake improvements: Automate export of includes if building as Cmake
    sub-module. (Rodion Malinovsky)

  - Debian spec file improvements: Use parallel build. Fix installation path
    on 64bit. (Michal Marek)

  - CMake improvements: Use `${CMAKE_INSTALL_LIBDIR}` instead of hardcoding
    lib. (Radek Dostál)

  - Experimental Windows 10 ARM support through CMAKE


# log4cplus 2.0-RC2

  - Avoid copying whole message just to prepend message length in
    `SocketAppender`. Instead, use OS specific "gather" socket write.

  - Fixed GitHub issue #136.

  - `FileAppender` classes now have `TextMode` property that can be set to
    `Binary` or `Text` (default) to specify underlying IO stream behavior
    with respect to end-of-line handling. (Patch by raphaelmarcucci).

  - Fixed compilation issues when building log4cplus with Visual Studio and
    Clang toolchain.

  - Fixed various shutdown and initialization related deadlocks and
    crashes. GitHub issues #251, #253.

  - Fixed GitHub issue #243. Single-threaded build with Visual Studio and
    CMake were not single-threaded.

  - Fixed GitHub issue #250. Creating WiX based installer using CPack does
    not work because of missing license file.


# log4cplus 2.0-RC1

  - **IMPORTANT**: Implementation language is now C++11. OS specific
    implementations have been replaced by C++11 facilities wherever
    possible. This lowers complexity of the library and improves
    maintainability but it also brings limitations to when the library can be
    used. Specifically, the library should not be used before `main()` is
    entered and after `main()` is left. Even more specifically, the library
    should not be used during global objects construction and destruction.

  - log4cplus uses Catch unit testing framework and has unit tests.

  - log4cplus supports IPv6.

  - Autotools based build system is now partially generated from templates by
    the Autogen tool.

  - Autotools based build system can build both `wchar_t` and plain `char`
    variants at once.
