NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #2332 most downloaded on PyPI
RotatingFileHandler replacement with concurrency, gzip and Windows support. Size and time based rotation.
Latest stable
0.9.31
Last release 1 months ago
21 Oct 2026
Release timing varies
gaps range from 2 weeks to 1.4 years
Most releases are documented
notes for 22 of 28 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
28 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Bugfix/issue 90 windows perf by @Preston-Landers in https://github.com/Preston-Landers/concurrent-log-handler/pull/91
Full Changelog: https://github.com/Preston-Landers/concurrent-log-handler/compare/0.9.30...0.9.31
Fix permission race window between file create and chmod, when the chmod and/or owner kwargs are configured. Issue #87
0.9.30
Mark Python 3.15 as supported.
Fix permission race window between file create and chmod, when the chmod and/or owner kwargs are configured.
Issue #87
The handler created files using the configured umask and applied _do_chown_and_chmod() afterward. In the
window between create and chmod, the file was visible in the filesystem with umask-derived (potentially
too-restrictive) permissions. A different-user process that opened the file during this window got
PermissionError, breaking the cross-user log sharing scenario the chmod/owner kwargs exist to support.
The lock file, the main log file, and rotated .gz files (from both handlers) are now pre-created atomically
with the correct permissions: a hidden temp file gets the owner and mode, then os.link() (POSIX) or
os.rename() (Windows) puts it in place. Other processes never see the public filename with intermediate
perms. On filesystems without hard links (FAT/exFAT, many SMB/CIFS and FUSE mounts), the handler falls back to
the previous create-then-chmod behavior. Handlers that don't configure chmod/owner are unaffected and pay
no extra syscalls.
Fix lost records when a process opens a lock file or log file that another user owns, with chmod or owner
configured. Only the owner of a file (or root) can chmod it, so every write from that process failed with
PermissionError, even though the file was writable. The handler now skips chmod/chown when the file already
has the configured mode and owner, and treats a failure as non-fatal (reported only in debug mode). Related
to Issue #87.
ConcurrentTimedRotatingFileHandler no longer creates the log file in its constructor. The standard library
created it there with the process umask, so the handler's umask, chmod, and owner settings did not apply
until the first write. Until then, a process running as another user could fail to create its handler, with
PermissionError. The file is now created on first write, as in ConcurrentRotatingFileHandler, and the
delay argument is ignored.
ConcurrentTimedRotatingFileHandler now applies chmod and owner to rotated .gz files. Before, they kept
umask-derived permissions.
Fix do_gzip() silently ignoring the configured umask parameter on rotated .gz files. The gzip.open()
call previously ran outside the _alter_umask() context, so rotated archives picked up the process default
umask instead of the handler's. Discovered while investigating Issue #87.
Fix a deadlock introduced in 0.9.29. If one thread was writing a log record when another thread called
fork(), the child process hung on its first log call. The child now resets the handler's thread lock. In the
same situation, a child that closed the handler before it logged (for example, through logging.shutdown()
at exit) released the parent's file lock while the parent was still writing. The child now also clears the
inherited lock state. Both fixes apply to Python 3.9 and later; on 3.7 and 3.8, logging holds handler locks
across fork(), so these problems do not occur.
Fix loss of a rotated log file after a failed gzip (for example, disk full). The failure leaves the rotated
file uncompressed. On the next rotation, ConcurrentRotatingFileHandler deleted that file (even when
backupCount allowed more), and ConcurrentTimedRotatingFileHandler could overwrite it with a later file from
the same period. Both handlers now keep it.
Remove a duplicate stale-file check from each write. On a local disk this cuts the time per write by about
13% when maxBytes is set, for both handlers.
Thanks to @jbfryar for a thorough bug report on Issue #87.
Full Changelog: https://github.com/Preston-Landers/concurrent-log-handler/compare/0.9.29...0.9.30
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Fix race conditions when a handler created before fork() is used by multiple child processes. Child processes that inherit a handler now automatically
Full Changelog: https://github.com/Preston-Landers/concurrent-log-handler/compare/0.9.28...0.9.29
Fix race conditions when a handler created before fork() is used by multiple child processes. Child processes
that inherit a handler now automatically reopen the lock file for independent lock isolation, and an in-process
threading lock prevents concurrent threads from bypassing flock() serialization.
Depend on portalocker >= 2.6.0 instead of 1.6.0. Earlier versions of portalocker on Windows can be problematic.
Add finalize_handler_configuration() hook to ConcurrentTimedRotatingFileHandler to allow customization of the
handler before the first rollover.
Fix missing a rollover when the app was shutdown during the scheduled time. Issue #81:
Full Changelog: https://github.com/Preston-Landers/concurrent-log-handler/compare/0.9.27...0.9.28
0.9.28:
Fix missing a rollover when the app was shutdown during the scheduled time. Issue #81:
When restarting after missing scheduled rollover times, the handler was updating to the next future rollover without actually rotating accumulated logs. Now performs catch-up rollovers on initialization. Also adds a unit test to simulate this scenario.
Fix NameError when logging during Python shutdown.
Issue #80:
During Python interpreter shutdown, built-in functions like open can be
cleaned up before __del__ methods run, causing NameError when libraries (e.g.,
aiohttp) attempt to log warnings about unclosed resources. This change stores
references to open and os.open at module level (_open and _os_open) and
uses these throughout the code, following the standard Python pattern for
shutdown-safe code. Adds new unit tests that verify logging works correctly
during shutdown scenarios, including extreme cases where even stored references
might become None.
Adds deprecation warning to queue.py setup_logging_queues().
Full Changelog: https://github.com/Preston-Landers/concurrent-log-handler/compare/0.9.26...0.9.27
Significant performance improvements, especially on the POSIX side.
keep_file_open=False in the constructor. The default
is True.keep_file_open option still applies
to the lock file and can improve performance when True.black are installed in "dev mode" (pip install -e .[dev]).lint.sh script to run Black, ruff, and mypy in one go.keep_file_open option.Full Changelog: https://github.com/Preston-Landers/concurrent-log-handler/compare/0.9.25...0.9.26
Update README.md by @Krogsager in https://github.com/Preston-Landers/concurrent-log-handler/pull/61
Full Changelog: https://github.com/Preston-Landers/concurrent-log-handler/compare/0.9.24...0.9.25
Full Changelog: 0.9.24...0.9.25
Fixes #58 issue building on certain platforms due to use_2to3 kwarg in setup.py.
Fixes #58 issue building on certain platforms due to use_2to3 kwarg in setup.py.
Begin requiring Python 3.6 or higher.
ConcurrentTimedRotatingFileHandler class which provides both time and/or size
based rotation. See the README.md for details.owner on Windows, though it will have no effect.concurrent-log-handler-0.9.23.tar.gz concurrent-log-handler-0.9.23-source-and-wheel.zip
Experimental release with support for time-based rotation (see README.md or PR#55 for details).
Compared to the previous release, the only change is a Python 2.7 compatibility fix.
Compared to the previous release, the only change is a Python 2.7 compatibility fix.
However, this is the final release that will support Python 2, which was end-of-life on Jan 1st, 2020.
Future versions will require Python 3.6 or higher.
Added new optional parameter "lock_file_directory"
support to execute setup_logging_queues in any times and asyncio by @ZhuYuJin in https://github.com/Preston-Landers/concurrent-log-handler/pull/32
Full Changelog: https://github.com/Preston-Landers/concurrent-log-handler/compare/0.9.19...0.9.20
Fixes Python 2.7 support in setup.py. Fixes accidental detection of Mac OS as Windows. Thanks @buddly27
Fixes Python 2.7 support in setup.py. Fixes accidental detection of Mac OS as Windows. Thanks @buddly27
Removes use of ez_setup.py, should fix some issues around installing old versions of distutils
Removes use of ez_setup.py, should fix some issues around installing old versions of distutils
Fix portalocker requirement on Python 2. Improve error handling.
Fix portalocker requirement on Python 2. Improve error handling.
The next release after this is likely to be a 1.0.0 release candidate.
Some incorrect code got inserted in the wheel, breaking Python 2 when installed from wheel. This should fix it. Sorry for the mixup.
Some incorrect code got inserted in the wheel, breaking Python 2 when installed from wheel. This should fix it. Sorry for the mixup.
Fix a Python 2 bug, and by default be more forgiving about encodings (default: ignore/drop characters which can't convert to the output encoding).
Fix a Python 2 bug, and by default be more forgiving about encodings (default: ignore/drop characters which can't convert to the output encoding).
0.9.14: Fix writing LF line endings on Windows when encoding is specified. Added newline and terminator kwargs to allow customizing line ending behavi
0.9.13: Fixes Crashes with ValueError: I/O operation on closed file (issue #16) Also should fix issue #13 with crashes related to Windows file locking
0.9.13: Fixes Crashes with ValueError: I/O operation on closed file (issue #16) Also should fix issue #13 with crashes related to Windows file locking. Big thanks to @terencehonles, @nsmcan, @wkoot, @dismine for doing the hard parts
This adds a umask option to allow setting permission bits when creating log files.
This adds a umask option to allow setting permission bits when creating log files.
Fix issues with gzip compression of logs on rotate (use buffered reads)
Fix issues with gzip compression of logs on rotate (use buffered reads)
This should fix a bug where the file lock was inadvertently shared among forked processes.
This should fix a bug where the file lock was inadvertently shared among forked processes.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.