Vinay Sajip
6d0bb43232
gh-117975: Ensure flush level is checked when configuring a logging MemoryHandler. (GH-117976)
2024-04-17 13:55:18 +01:00
Mariusz Felisiak
d823c23549
gh-115032: Update DictConfigurator.configure_formatter() comment about `fmt` retry. (GH-115303)
2024-02-13 08:47:40 +00: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
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
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
Vinay Sajip
ac4ddab405
gh-90195: Unset logger disabled flag when configuring it. (GH-96530)
2022-09-03 13:38:38 +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
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
Inada Naoki
c2b7a66b91
bpo-43731: Add an `encoding` parameter to logging.fileConfig() (GH-25273)
2021-04-13 18:17:03 +09:00
Vinay Sajip
46abfc1416
bpo-39142: Avoid converting namedtuple instances to ConvertingTuple. (GH-17773)
...
This uses the heuristic of assuming a named tuple is a subclass of
tuple with a _fields attribute. This change means that contents of
a named tuple wouldn't be converted - if a user wants to have
ConvertingTuple functionality from a namedtuple, they will have to
implement it themselves.
2020-01-01 19:32:11 +00:00
Lucas Cimon
b15100fe7d
bpo-38586: setting logging.Handler .name property in fileConfig (GH-16918)
2019-10-31 08:06:25 +00:00
Vinay Sajip
1d094af716
Updated incorrect level-setting code to use setLevel(). (GH-16325)
2019-09-22 03:51:51 +01:00
BNMetrics
18fb1fb943
bpo-34844: logging.Formatter enhancement - Ensure style and format string matches in logging.Formatter (GH-9703)
2018-10-15 19:41:36 +01:00
Xtreak
087570af6d
bpo-33978: Close existing handlers before logging (re-)configuration. (GH-8008)
2018-07-02 09:57:46 +01:00
Serhiy Storchaka
3f2e6f15d6
Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624)
2018-02-26 16:50:11 +02:00
sanjayp
2ae4ad7ca4
Changed lambda to str.strip in _strip_spaces in logging.config ( #4332 )
2017-11-15 09:28:11 +00:00
Victor Stinner
97d7e65dfe
bpo-30830: logging.config.listen() calls server_close() ( #3524 )
...
The ConfigSocketReceiver.serve_until_stopped() method from
logging.config.listen() now calls server_close() (of
socketserver.ThreadingTCPServer) rather than closing manually the
socket.
While this change has no effect yet, it will help to prevent dangling
threads once ThreadingTCPServer.server_close() will join spawned
threads (bpo-31233).
2017-09-13 01:44:08 -07:00
Antoine Pitrou
a6a4dc816d
bpo-31370: Remove support for threads-less builds ( #3385 )
...
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
2017-09-07 18:56:24 +02:00
Preston Landers
6ea56d2ebc
bpo-31080: Allowed logging.config.fileConfig() to accept both args and kwargs. (GH-2979)
2017-08-02 21:44:28 +01:00
Jon Dufresne
3972628de3
bpo-30296 Remove unnecessary tuples, lists, sets, and dicts ( #1489 )
...
* Replaced list(<generator expression>) with list comprehension
* Replaced dict(<generator expression>) with dict comprehension
* Replaced set(<list literal>) with set literal
* Replaced builtin func(<list comprehension>) with func(<generator
expression>) when supported (e.g. any(), all(), tuple(), min(), &
max())
2017-05-18 07:35:54 -07:00
Vinay Sajip
b74034351f
Issue #28335 : made minor improvement to implementation.
2016-10-03 19:50:56 +01:00
Vinay Sajip
aa27582f35
Closes #28335 : used 'raise from' in logging configuration code.
2016-10-03 19:45:50 +01:00
Vinay Sajip
ddbd2ee6e5
Closes #21203 : Updated fileConfig and dictConfig to remove inconsistencies. Thanks to Jure Koren for the patch.
2014-04-15 14:24:53 +01:00
Vinay Sajip
b1698d4030
Issue #20444 : Reduced code duplication.
2014-03-20 13:14:39 +00:00
Vinay Sajip
71dcb28d1c
Issue #20558 : Improved implementation of error handling.
2014-03-20 13:03:17 +00:00
Victor Stinner
7fa767e517
Issue #20976 : pyflakes: Remove unused imports
2014-03-20 09:16:38 +01:00
Brett Cannon
cd171c8e92
Issue #18200 : Back out usage of ModuleNotFoundError (8d28d44f3a9a)
2013-07-04 17:43:24 -04:00
Brett Cannon
0a140668fa
Issue #18200 : Update the stdlib (except tests) to use
...
ModuleNotFoundError.
2013-06-13 20:57:26 -04:00
Vinay Sajip
3b84eae03e
Closes #18046 : Simplified logging internals relating to levels and their names. Thanks to Alex Gaynor for the patch.
2013-05-25 03:20:34 -07:00
Vinay Sajip
04cc55a14c
Closes #17540 : Merged fix from 3.3.
2013-03-29 17:59:15 +00:00
Vinay Sajip
28421c6f62
Issue #17540 : Added style to Formatter configuration by dict.
2013-03-29 17:56:54 +00:00
Vinay Sajip
8ec95b81d5
Closes #17521 : Merged fix from 3.3.
2013-03-23 11:23:05 +00:00
Vinay Sajip
9b862b9d66
Issue #17521 : Merged fix from 3.2.
2013-03-23 11:22:00 +00:00
Vinay Sajip
68b4cc87cd
Issue #17521 : Corrected non-enabling of logger following two calls to fileConfig().
2013-03-23 11:18:45 +00:00
Vinay Sajip
5a63fe6813
Closes #17508 : Merged fix from 3.3.
2013-03-22 15:27:52 +00:00
Vinay Sajip
340a4bb2fe
Issue #17508 : Merged fix from 3.2.
2013-03-22 15:23:13 +00:00
Vinay Sajip
3f885b5432
Issue #17508 : Handled out-of-order handler configuration correctly.
2013-03-22 15:19:54 +00:00
Andrew Svetlov
0832af6628
Issue #16717 : get rid of socket.error, replace with OSError
2012-12-18 23:10:48 +02:00
Vinay Sajip
8d27023a7e
Allow configuration of handler properties.
2012-11-15 14:20:18 +00:00
Vinay Sajip
cf9e2f2420
Closes #16110 : fileConfig now accepts a pre-initialised ConfigParser instance.
2012-10-09 09:06:03 +01:00
Vinay Sajip
8cf4eb1463
Issue #16141 : replaced old-style exception handling code in logging with the modern idiom.
2012-10-09 08:06:13 +01:00
Vinay Sajip
3e763dadde
Updated docstring for logging.config.listen().
2012-10-02 16:15:33 +01:00
Vinay Sajip
4ded5512d7
Issue #15452 : Added verify option for logging configuration socket listener.
2012-10-02 15:56:16 +01:00
Florent Xicluna
5252f9faee
logging: replace codecs.open with builtins.open, remove '_encoded' sort, add some tests.
2011-11-07 19:43:05 +01:00
Florent Xicluna
aabbda5354
Merge 3.2
2011-10-28 14:52:29 +02:00