Commit graph

497 commits

Author SHA1 Message Date
Vinay Sajip e21754d7f8
gh-114706: Allow QueueListener.stop() to be called more than once. (GH-114748) 2024-01-30 12:34:18 +00:00
Tristan Pank 07236f5b39
gh-114494: Change logging docstring to bool for exec_info (GH=114558) 2024-01-26 21:48:22 +02:00
Vinay Sajip 67655d8ad5
gh-111615: Fix regression in QueueHandler configuration. (GH-111638) 2023-12-27 09:35:15 +00:00
Vinay Sajip a5f29c9faf
gh-110875: Handle '.' properties in logging formatter configuration c… (GH-110943) 2023-11-09 18:55:22 +00:00
Łukasz Langa 6d42759c5e
gh-111276: Clarify docs and comments about the role of LC_CTYPE (#111319)
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>
2023-10-27 11:43:01 +02:00
Dale Collison 74723e1110
gh-109461: Update logging module lock to use context manager (#109462)
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-27 18:26:41 +02:00
Peeyush Aggarwal 8d4052075e
gh-103384: Generalize the regex pattern BaseConfigurator.INDEX_PATTERN to allow spaces and non-alphanumeric characters in keys. (GH-103391)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-08-25 09:15:26 +01:00
Romuald Brunet a482e5bf00
gh-76913: Add "merge extras" feature to LoggerAdapter (GH-107292) 2023-08-15 08:23:54 +01:00
Nikita Sobolev 8fcee6b279
gh-107710: Speed up logging.getHandlerNames function (#107711) 2023-08-07 14:52:36 +01:00
Jochem Boersma 5e5a34ac3a
gh-107028: tiny textual changes in logging docs and docstrings (GH-107029) 2023-07-22 21:43:18 +01:00
Irit Katriel fb32f35c05
gh-102799: replace internal sys.exc_info() call by sys.exception() (#106746) 2023-07-14 20:41:24 +01:00
Victor Stinner dcc028d924
gh-105376: Remove logging.warn() and LoggerAdapter.warn() (#106553) 2023-07-09 10:32:50 +02:00
Ariel Eizenberg 99b00efd5e
gh-106238: Handle KeyboardInterrupt during logging._acquireLock() (GH-106239)
Co-authored-by: Ariel Eizenberg <ariel.eizenberg@pagaya.com>
2023-07-06 08:02:22 +01:00
Victor Stinner 6c54e5d721
gh-105376: Remove logging.Logger.warn() method (#105377) 2023-06-06 18:35:51 +00:00
Prince Roshan 12f1581b0c
gh-103606: raise RuntimeError if config file is invalid or empty (#104701)
(this adjusts new code) raise RuntimeError if provided config file is invalid or empty, not ValueError.
2023-05-20 22:26:49 +00:00
Prince Roshan 152227b569
gh-103606: Improve error message from logging.config.FileConfig (GH-103628) 2023-05-18 05:20:47 +01:00
Bar Harel 8f54302ab4
gh-103357: Add logging.Formatter defaults support to logging.config fileConfig and dictConfig (GH-103359) 2023-04-12 08:35:56 +01:00
Irit Katriel 44bd3fe570
gh-102799: use exception instance instead of sys.exc_info() (#102885) 2023-03-31 11:23:02 +01:00
cemysce 1d1bb95abd
gh-99811: Use correct variable to search for time in format string (GH-99812)
Use correct variable to search for asctime
2022-11-28 18:25:03 +00:00
Vinay Sajip f6b1e4048d
gh-98307: Add docstring and documentation for SysLogHandler.createSocket (GH-98319)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-16 09:15:46 +01:00
Vinay Sajip ac4ddab405
gh-90195: Unset logger disabled flag when configuring it. (GH-96530) 2022-09-03 13:38:38 +01:00
Vinay Sajip 29f1b0bb1f
gh-89258: Add a getChildren() method to logging.Logger. (GH-96444)
Co-authored-by: Éric <merwok@netwok.org>
2022-08-31 10:50:29 +01:00
Vinay Sajip 6fbd889d6e
gh-89047: Fix msecs computation so you never end up with 1000 msecs. (GH-96340) 2022-08-27 13:33:24 +01:00
Vinay Sajip 013e659e49
gh-92007: Handle elevation errors in NTEventLogHandler more grace… (GH-96322) 2022-08-27 12:13:19 +01:00
Duncan Grisby 1499d73b3e
gh-96159: Fix significant performance degradation in logging.TimedRotat… (GH-96182) 2022-08-23 07:28:43 +01:00
David Bonner 37c0f9ccc0
gh-95804: Respect MemoryHandler.flushOnClose in logging shutdown. (GH-95857) 2022-08-10 18:08:55 +01:00
Robert O'Shea cd26595232
gh-95454: Replace truthy/falsy with true/false (GH-95456) 2022-07-30 00:42:21 -07:00
Erik Montnemery c60f125533
bpo-46755: Don't log stack info twice in QueueHandler (GH-31355) 2022-07-05 15:23:12 +01:00
Adrian Garcia Badaracco 296081a7ce
gh-92592: Allow logging filters to return a LogRecord. (GH-92591) 2022-06-07 16:53:57 +01:00
Vinay Sajip 1b74803991
gh-93162: Add ability to configure QueueHandler/QueueListener together (GH-93269)
Also, provide getHandlerByName() and getHandlerNames() APIs.

Closes #93162.
2022-06-07 10:20:35 +02:00
Colin Delahunty 3d647e70cf
[doc] Correct a grammatical error in a docstring. (GH-93441) 2022-06-04 17:42:08 +01:00
jackh-ncl cc377063ef
gh-91513: Add 'asyncio' taskName to logging LogRecord attributes. (GH-93193) 2022-05-26 09:30:51 +01:00
Thomas Miedema 5e9323a547
Delete outdated comment in logging module (#31117)
The root logger is now accessible via its name, see
https://github.com/python/cpython/pull/15077

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-05-02 16:29:03 -06:00
Alex Waygood ab616d323d
gh-92128: Add __class_getitem__ to logging.LoggerAdapter and logging.StreamHandler (#92129)
Closes #92128
2022-05-02 09:10:02 -06:00
Jouke Witteveen c12ba6b2ff
bpo-45171: Remove tests of deprecated logger.warn(). (GH-32139) 2022-03-27 19:22:05 +01:00
Jouke Witteveen 5ca6d7469b
bpo-45171: Fix stacklevel handling in logging. (GH-28287) 2022-03-27 14:49:28 +01:00
Michael P. Nitowski d8066b420b
bpo-46557: Log captured warnings without format string (GH-30975) 2022-03-15 09:01:03 +00:00
Mario Corchero d7c6863979
bpo-41906: Accept built filters in dictConfig (GH-30756)
When configuring the logging stack, accept already built filters (or
just callables) in the filters array of loggers and handlers.
This facilitates passing quick callables as filters.

Automerge-Triggered-By: GH:vsajip
2022-01-24 04:39:50 -08:00
Irit Katriel 0d639678d3
bpo-46332: use raise..from instead of assigning __cause__ and raising (GH-30517) 2022-01-10 18:59:21 +00:00
Vinay Sajip cb589d1b6b
bpo-46063: Improve algorithm for computing which rolled-over log file… (GH-30093) 2021-12-14 00:53:37 +00:00
Vinay Sajip 8a77f59de5
bpo-45628: Check all parts of the suffix for an extension match. (GH-29310) 2021-10-29 14:40:37 +01:00
Vinay Sajip 62a667784b
bpo-45401: Change shouldRollover() methods to only rollover regular f… (GH-28822)
…iles.

Also changed some historical return values from 1 -> True and 0 -> False.
2021-10-10 08:15:24 -07:00
Kirill Pinchuk 3d315c3116
bpo-44291: Fix reconnection in logging.handlers.SysLogHandler (GH-26490) 2021-08-05 14:58:16 +01:00
Vinay Sajip 6ff8903809
bpo-44753: Don't use logfile extension when determining old files to be deleted (GH-27475) 2021-07-30 12:48:50 +01:00
Mariusz Felisiak 11749e2dc2
bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-07-27 00:11:55 +02:00
andrei kulakov 96cf5a63d2
bpo-42378: fixed log truncation on logging shutdown (GH-27310)
Automerge-Triggered-By: GH:vsajip
2021-07-25 13:17:47 -07:00
Vinay Sajip 3b8075f907
bpo-44473: Update docstring and documentation for QueueHandler.prepar… (GH-27140)
…e().
2021-07-14 17:06:48 -07:00
andrei kulakov 8b93f0e696
bpo-43858: Add logging.getLevelNamesMapping() (GH-26459)
Added a function that returns a copy of a dict of logging levels.
2021-06-03 01:12:59 -07:00
Yonatan Goldschmidt 156699bca0
bpo-44222: Improve _removeHandlerRef() for a very long _handlerList (GH-26325)
The list lookups become a big burden for very long lists.
This patch changes the "happy flow" path of 2 lookups into 1 lookup.

Automerge-Triggered-By: GH:vsajip
2021-05-25 15:40:23 -07:00
Inada Naoki c2b7a66b91
bpo-43731: Add an encoding parameter to logging.fileConfig() (GH-25273) 2021-04-13 18:17:03 +09:00