summaryrefslogtreecommitdiffstats
path: root/Lib/logging/handlers.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-90535: Fix support of interval>1 in logging.TimedRotatingFileHandler ↵Serhiy Storchaka2024-03-161-1/+4
| | | | | | | (GH-116220) Fix support of interval values > 1 in logging.TimedRotatingFileHandler for when='MIDNIGHT' and when='Wx'.
* Replace stat.ST_xxx usage with os.stat().st_xxx (#116501)Victor Stinner2024-03-081-20/+35
| | | | | | | | Modernize code to use the new API which avoids the usage of the stat module just to read os.stat() members. * Sort logging.handlers imports. * Rework reopenIfNeeded() code to make it easier to follow. * Replace "not self.stream" with "self.stream is None".
* gh-115809: Improve TimedRotatingFileHandler.getFilesToDelete() (GH-115812)Serhiy Storchaka2024-03-031-27/+24
| | | | | | | Improve algorithm for computing which rolled-over log files to delete in logging.TimedRotatingFileHandler. It is now reliable for handlers without namer and with arbitrary deterministic namer that leaves the datetime part in the file name unmodified.
* gh-88352: Fix logging.TimedRotatingFileHandler (GH-116191)Serhiy Storchaka2024-03-011-30/+21
| | | | | | | * Do not overwrite already rolled over files. It happened at midnight or during the DST change and caused the loss of data. * computeRollover() now always return the timestamp larger than the specified time. * Fix computation of the rollover time during the DST change.
* gh-93205: When rotating logs with no namer specified, match whole extension ↵Gabriele Catania2024-02-211-19/+24
| | | | (GH-93224)
* gh-114706: Allow QueueListener.stop() to be called more than once. (GH-114748)Vinay Sajip2024-01-301-3/+4
|
* gh-111276: Clarify docs and comments about the role of LC_CTYPE (#111319)Łukasz Langa2023-10-271-4/+2
| | | | | | | | Fix locale.LC_CTYPE documentation to no longer mention string.lower() et al. Those functions were removed in Python 3.0: https://docs.python.org/2/library/string.html#deprecated-string-functions Also, fix a comment in logging about locale-specific behavior of `str.lower()`. Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-109461: Update logging module lock to use context manager (#109462)Dale Collison2023-09-271-24/+6
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-107028: tiny textual changes in logging docs and docstrings (GH-107029)Jochem Boersma2023-07-221-1/+1
|
* gh-98307: Add docstring and documentation for SysLogHandler.createSocket ↵Vinay Sajip2022-10-161-1/+8
| | | | | (GH-98319) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-92007: Handle elevation errors in NTEventLogHandler more grace… (GH-96322)Vinay Sajip2022-08-271-1/+10
|
* gh-96159: Fix significant performance degradation in logging.TimedRotat… ↵Duncan Grisby2022-08-231-3/+7
| | | | (GH-96182)
* bpo-46755: Don't log stack info twice in QueueHandler (GH-31355)Erik Montnemery2022-07-051-1/+2
|
* gh-93162: Add ability to configure QueueHandler/QueueListener together ↵Vinay Sajip2022-06-071-0/+1
| | | | | | | (GH-93269) Also, provide getHandlerByName() and getHandlerNames() APIs. Closes #93162.
* bpo-46063: Improve algorithm for computing which rolled-over log file… ↵Vinay Sajip2021-12-141-3/+16
| | | | (GH-30093)
* bpo-45628: Check all parts of the suffix for an extension match. (GH-29310)Vinay Sajip2021-10-291-2/+7
|
* bpo-45401: Change shouldRollover() methods to only rollover regular f… ↵Vinay Sajip2021-10-101-4/+10
| | | | | | | (GH-28822) …iles. Also changed some historical return values from 1 -> True and 0 -> False.
* bpo-44291: Fix reconnection in logging.handlers.SysLogHandler (GH-26490)Kirill Pinchuk2021-08-051-25/+38
|
* bpo-44753: Don't use logfile extension when determining old files to be ↵Vinay Sajip2021-07-301-1/+2
| | | | deleted (GH-27475)
* bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)Mariusz Felisiak2021-07-261-2/+2
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44473: Update docstring and documentation for QueueHandler.prepar… ↵Vinay Sajip2021-07-151-4/+7
| | | | | (GH-27140) …e().
* bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25189)Inada Naoki2021-04-061-1/+6
| | | | | | | | | | | | * Fix _sitebuiltins * Fix test_inspect * Fix test_interpreters * Fix test_io * Fix test_iter * Fix test_json * Fix test_linecache * Fix test_lltrace * Fix test_logging * Fix logging
* bpo-41503: Fix race between setTarget and flush in ↵Irit Katriel2020-08-161-1/+5
| | | | logging.handlers.MemoryHandler (GH-21765)
* bpo-39826: add getConnection() hook to logging HTTPHandler (GH-18745)l0rb2020-03-041-5/+16
|
* bpo-39292: Add missing syslog facility codes. (GH-17945)Vinay Sajip2020-01-101-21/+28
|
* bpo-38781: Clear buffer in MemoryHandler flush (GH-17132)Daniel Andersson2019-11-131-2/+2
| | | | | | | | This makes it easier to use a custom buffer when subclassing MemoryHandler (by avoiding the explicity empty list literal assignment in the flush method). For example, collection.deque can now be used without any modifications to MemoryHandler.flush. The same applies to BufferingHandler.
* bpo-38716: stop rotating handlers from setting inherited namer and rotator ↵l0rb2019-11-061-2/+3
| | | | to None (GH-17072)
* bpo-37111: Add 'encoding' and 'errors' parameters to logging.basicCon… ↵Vinay Sajip2019-06-171-8/+19
| | | | (GH-14008)
* Fix extraneous whitespace in QueueListener.prepare (GH-13803)Boris Feld2019-06-041-1/+1
|
* bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113)Bar Harel2019-06-011-0/+2
| | | | | | | | Fixed QueueListener in order to avoid random deadlocks. Unable to add regression tests atm due to time constraints, will add it in a bit. Regarding implementation, although it's nested, it does not cause performance issues whatsoever, and does not call task_done() in case of an exception (which is the right thing to do IMHO). https://bugs.python.org/issue36813
* bpo-35726: Prevented QueueHandler formatting from affecting other handlers ↵Manjusaka2019-01-231-0/+3
| | | | | (GH-11537) QueueHandler.prepare() now makes a copy of the record before modifying and enqueueing it, to avoid affecting other handlers in the chain.
* bpo-34334: Don't log traceback twice in QueueHandler (GH-9537)Cheryl Sabella2018-09-251-2/+3
|
* bpo-30904: Removed duplicated Host: header. (#4465)Vinay Sajip2017-11-191-1/+3
|
* bpo-30989: Sort in TimedRotatingFileHandler only when needed. (GH-2812)Lovesh Harchandani2017-10-271-1/+1
| | | TimedRotatingFileHandler.getFilesToDelete() now sorts only when needed.
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-109/+106
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-31084: QueueHandler now formats messages correctly. (GH-2954)favll2017-08-011-4/+5
|
* bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses ↵Xiang Zhang2017-06-011-5/+20
| | | | (#1676)
* bpo-29808: SysLogHandler: Do not fail if initial connect to syslog failed ↵Коренберг Марк2017-03-171-1/+8
| | | | (#663) (#663)
* Closes #27930: Merged fix from 3.5.Vinay Sajip2016-09-081-15/+2
|\
| * Fixes #27930: improved QueueListener behaviour.Vinay Sajip2016-09-081-17/+4
| |
* | Closes #27493: accepted Path objects in file handlers for logging.Vinay Sajip2016-07-221-0/+3
| |
* | Closes #26559: Allow configuring flush-on-close behaviour of MemoryHandler.Vinay Sajip2016-07-221-5/+15
| |
* | Fixed #27251: merged fix from 3.5.Vinay Sajip2016-06-071-2/+2
|\ \ | |/
| * Fixed #27251: corrected string/bytes handling in credentials.Vinay Sajip2016-06-071-2/+2
| |
* | Closes #25685: Merged fix from 3.5.Vinay Sajip2015-12-261-0/+2
|\ \ | |/
| * Closes #25685: Made SocketHandler emission more efficient.Vinay Sajip2015-12-261-0/+2
| |
* | Closes #25411: Merged fix from 3.5.Vinay Sajip2015-10-171-8/+10
|\ \ | |/
| * Closes #25411: Merged fix from 3.4.Vinay Sajip2015-10-171-8/+10
| |\
| | * Closes #25411: Improved Unicode support in SMTPHandler.Vinay Sajip2015-10-171-10/+12
| | |
* | | Closes #24884: refactored WatchedFileHandler file reopening into a separate ↵Vinay Sajip2015-10-011-3/+12
|/ / | | | | | | method, based on a suggestion and patch by Marian Horban.