concurrent-log-handler
RotatingFileHandler replacement with concurrency, gzip and Windows support. Size and time based rotation.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem in multi-process Python applications. Use it when you need safe concurrent logging to a single file with rotation. Not necessary if you're using a centralized logging service (e.g., CloudWatch, Logstash) or a single-process application.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Each process must instantiate its own handler; handlers cannot be serialized and shared across process boundaries (including forked children).
- Threads within the same process can share a single instance.
- Low friction: pure Python wheel with a single runtime dependency (portalocker >= 2.6.0).
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 (permissive): you may use, modify, and distribute this package freely in commercial and open-source projects, provided you include a copy of the license and note any modifications.
last release 2026-02-22 (173 days) · last repo commit 2026-04-14 · 381 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,670,494 downloads/mo, #2,532 on PyPI
Alternatives
Verify before relying
import logging
from concurrent_log_handler import ConcurrentRotatingFileHandler
logger = logging.getLogger(__name__)
handler = ConcurrentRotatingFileHandler(
"mylogfile.log", "a", maxBytes=512*1024, backupCount=5
)
logger.addHandler(handler)
logger.info("Concurrent log message")- Whether portalocker >= 2.6.0 introduces any breaking changes or new dependencies beyond pywin32 on Windows.
- Performance characteristics under high-throughput logging scenarios relative to other concurrent logging solutions.
- Behavior when log files are on network drives with high latency or intermittent connectivity.
What it is and what it does
concurrent-log-handler extends Python's standard logging module with handlers that safely coordinate writes from multiple processes and threads to a single log file. It uses file locking (via portalocker) to serialize access and prevent corruption when concurrent writers attempt to log simultaneously. The package supports both size-based rotation (e.g., rotate after 512 KB) and time-based rotation (e.g., daily), with optional gzip compression of rotated files.
The package is designed for applications running in multiple processes on the same machine or across different machines sharing a network drive, where a centralized log file is required without the overhead of external logging services. Version 0.9.29 addresses race conditions in forked child processes and logging during interpreter shutdown. Each process must create its own handler instance; handlers cannot be pickled and reused across process boundaries, though threads within a single process can safely share one handler.
Use it for
- Multi-worker web applications (e.g., Gunicorn, uWSGI) logging to a shared file on the same or networked filesystem.
- Batch processing jobs spawned via multiprocessing that need centralized audit or error logs.
- Long-running services with periodic log rotation to manage disk space without external log management.
- Development and testing environments where multiple test processes write to a single consolidated log.
- Applications on Windows and POSIX systems requiring cross-platform file locking without external dependencies.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem in multi-process Python applications. Use it when you need safe concurrent logging to a single file with rotation. Not necessary if you're using a centralized logging service (e.g., CloudWatch, Logstash) or a single-process application.
Install
concurrent-log-handler on PyPI
Before you install
Low friction: pure Python wheel with a single runtime dependency (portalocker >= 2.6.0). Actively maintained as of February 2026, with recent fixes for fork-related race conditions and logging during shutdown. No known vulnerabilities.
Each process must instantiate its own handler; handlers cannot be serialized and shared across process boundaries (including forked children). Threads within the same process can share a single instance.
License in practice
Apache-2.0 (permissive): you may use, modify, and distribute this package freely in commercial and open-source projects, provided you include a copy of the license and note any modifications.
Quickstart
import logging
from concurrent_log_handler import ConcurrentRotatingFileHandler
logger = logging.getLogger(__name__)
handler = ConcurrentRotatingFileHandler(
"mylogfile.log", "a", maxBytes=512*1024, backupCount=5
)
logger.addHandler(handler)
logger.info("Concurrent log message")
Verify before relying
- Whether portalocker >= 2.6.0 introduces any breaking changes or new dependencies beyond pywin32 on Windows.
- Performance characteristics under high-throughput logging scenarios relative to other concurrent logging solutions.
- Behavior when log files are on network drives with high latency or intermittent connectivity.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageportalocker |
| Maintenance | Actively maintained 173 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,670,494 / month, #2,532 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaLicense :: OSI Approved :: Apache Software LicenseOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Logging |
Evidence: concurrent_log_handler-0.9.29-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “concurrent logging multiple processes”
- concurrent-log-handlerProvides thread-safe and process-safe logging handlers for Python's…
- filelockProvides a platform-independent file locking mechanism to coordinate…
- aiomultiprocessCombines AsyncIO and multiprocessing to run concurrent async tasks…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also multiprocessing-logging · oslo.concurrency · aws-logging-handlers · loguru · logging · pygtail · portalocker · opensearch-logger · filelock · multitasking