File python-concurrent-log-handler.changes of Package python-concurrent-log-handler
-------------------------------------------------------------------
Wed Aug 20 10:39:27 UTC 2025 - Jürgen Löhel <juergen@loehel.de>
- Update to version 0.9.28:
* Fix missing rollovers when a worker was restarted before the next logging event,
but after the last scheduled rollover.
[Issue #81](https://github.com/Preston-Landers/concurrent-log-handler/issues/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](https://github.com/Preston-Landers/concurrent-log-handler/issues/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.
-------------------------------------------------------------------
Wed Aug 20 10:38:47 UTC 2025 - Jürgen Löhel <juergen@loehel.de>
- Update to version 0.9.27:
* Fixes [Issue #73](https://github.com/Preston-Landers/concurrent-log-handler/issues/73)
Fixed a subtle bug in the timed handler where it could fail to delete the
correct number of old log files during rotation.
This could occur if a backup file had a name containing a date-like string
that was not a valid calendar date (e.g., log.9999-99-99).
The cleanup logic no longer falls back to using modification time in these
cases. It now safely ignores anomalous files, ensuring the cleanup process
is predictable and targets only valid, dated backups.
* Fixes [Issue #79](https://github.com/Preston-Landers/concurrent-log-handler/issues/79)
Greatly improved the resiliency of the timed rollover mechanism, hardening
it against timestamp errors and state corruption. The handler now validates
all timestamps from the system clock and the internal lock file against a
reasonable minimum. This prevents rollover failures that could occur if the
system time was set to an invalid value (e.g., the 1970 epoch) or if the
lock file's state became corrupted.
* Adds `DeprecationWarning` to `setup_logging_queues`:
The `concurrent_log_handler.queue` module and `setup_logging_queues()` are deprecated
and will be removed in a future version. This utility has known robustness and
compatibility issues with complex logging setups. It is recommended to stop
using this function and rely on the handlers' default synchronous behavior.
Check the project README for additional developments.
-------------------------------------------------------------------
Tue Jun 3 06:40:12 UTC 2025 - Jürgen Löhel <juergen@loehel.de>
- initial commit